Skip to content

Instantly share code, notes, and snippets.

@dpick
Created February 4, 2012 19:22
Show Gist options
  • Save dpick/1739593 to your computer and use it in GitHub Desktop.
Save dpick/1739593 to your computer and use it in GitHub Desktop.
board = [[nil, nil, nil], [nil, nil, nil], [nil, nil, nil]]
current_player = 'x'
def game_over?
false
end
def make_move(player, row, col)
board[row][col] = player
end
while !game_over?
print "Enter a row:"
row = gets.chomp.to_i
print "Enter a col:"
col = gets.chomp.to_i
make_move()
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment