Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

15 lines (11 sloc) 0.457 kb
# Complete the function below to print 2 integers separated by a single space which will be your next move
def next_move(player,board)
player =, board)
print player.move.row_and_column
#If player is X, I'm the first player.
#If player is O, I'm the second player.
player = gets.chomp
#Read the board now. The board is a 3x3 array filled with X, O or _.
board = { gets.scan /\w/ }
Jump to Line
Something went wrong with that request. Please try again.