Permalink
Browse files

Make the loops in best_more_for method more alike

  • Loading branch information...
edgenard committed Apr 2, 2018
1 parent 66f4c29 commit 21918f4e79788a5c6d17b05db981e1ad62ea85fe
Showing with 5 additions and 1 deletion.
  1. +5 −1 tic-tac-toe/tic_tac_toe.rb
@@ -16,7 +16,11 @@ def best_move_for(player)
end
end

SQUARES_ON_BOARD.each { |square| return square if square_unoccupied?(square) }
SQUARES_ON_BOARD.each do |square|

This comment has been minimized.

@medwards1771

medwards1771 Apr 3, 2018

Collaborator

Why did you go to the trouble of changing curly braces to a do-end block?

if square_unoccupied?(square)
return square
end
end
return NO_MOVE
end

0 comments on commit 21918f4

Please sign in to comment.