Skip to content
This repository has been archived by the owner on Apr 24, 2019. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Make the loops in best_more_for method more alike
  • Loading branch information
edgenard committed Apr 2, 2018
1 parent 66f4c29 commit 21918f4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tic-tac-toe/tic_tac_toe.rb
Expand Up @@ -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.

Copy link
@medwards1771

medwards1771 Apr 3, 2018

Contributor

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

Expand Down

0 comments on commit 21918f4

Please sign in to comment.