Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (11 sloc) 457 Bytes
# 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/ }