lib/mastermind/player/human.rb in mastermind-game-0.0.1 vs lib/mastermind/player/human.rb in mastermind-game-0.0.2
- old
+ new
@@ -9,10 +9,10 @@
print "\r" + Console::View.attempt_line(turn, width: length) if attempt
color = Game::Piece::COLORS[Human.get_choice(choices: ("1".."6")).to_i - 1]
sequence << color
end
- sequence
+ Game::Code.from(sequence)
end
def get_guess_for(game)
length = game.secret_length
get_code(length: length, attempt: game.attempts + 1)