Sha256: 11b1c19293fc2de1cce0d29730682890a0ae25277aa30f017e0d8702d8bea549

Contents?: true

Size: 358 Bytes

Versions: 2

Compression:

Stored size: 358 Bytes

Contents

module TTT
  class GameStateChanger
    attr_accessor :game

    def change_game_state(player_choice, game)
      @game = game
      change_square(player_choice)
    end

    def change_square(display_value)
      game.change_square(display_value, game.current_player_value)
      if !game.won?
        game.move_forward_one_turn
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
games_bfox-0.3.0 lib/games/tictactoe/game_state_changer.rb
games_bfox-0.2.0 lib/games/tictactoe/game_state_changer.rb