Skip to content

Commit

Permalink
Changed current_player reference to current_player_mark
Browse files Browse the repository at this point in the history
  • Loading branch information
lisahamm committed Mar 11, 2015
1 parent 1f460a4 commit 127fca8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/tic_tac_toe/ai.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ module TicTacToe
class AI
attr_reader :mark

def initialize(player)
@mark = player.mark
def initialize(mark)
@mark = mark
end

def get_move(board)
Expand Down
2 changes: 1 addition & 1 deletion lib/tic_tac_toe/game.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def take_turn(cell_number)
end

def generate_ai_move
TicTacToe::AI.new(current_player).get_move(board)
TicTacToe::AI.new(current_player_mark).get_move(board)
end

def switch_turn
Expand Down

0 comments on commit 127fca8

Please sign in to comment.