Created
February 4, 2012 19:22
-
-
Save dpick/1739593 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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