Created
July 18, 2014 21:55
-
-
Save pumpkincouture/22f3a7e77204af181951 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#In initialize method | |
@game_over=false | |
def third_turn | |
if win_one | |
@game_over=true | |
else | |
block_one | |
end | |
end | |
def fourth_turn | |
return if @game_over | |
block_two unless win_two | |
end | |
def fifth_turn | |
return if @game_over | |
random_move unless last_win | |
end | |
new_game=Game.new("Human", "Tic Tac Toe Warlord") | |
new_game.second_turn | |
new_game.third_turn | |
new_game.fourth_turn | |
new_game.fifth_turn | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment