Short cleanup

This commit is contained in:
Alexander Munch-Hansen 2018-01-25 20:44:22 +01:00
parent eb5e6771b6
commit 4a8d1c8d1e

6
bot.rb
View File

@ -9,9 +9,6 @@ class Bot
end
def move board
return "\nGame is done!" if board.is_full?
return "\nSomeone won!" if board.any_winner?
minmax board, @piece
board.set @piece, @best_choice
end
@ -53,8 +50,7 @@ class Bot
end
def score board
#p @piece
#p @opponent
if board.is_winner? @piece
return 10
elsif board.is_winner? @opponent