Sha256: 1ccfdf7148e78149047f99d208fa1cf7f7c529d213b9a1a18a0c0d610e9c87df
Contents?: true
Size: 518 Bytes
Versions: 4
Compression:
Stored size: 518 Bytes
Contents
require_relative 'modules/console' require_relative 'modules/score' module Codebreaker class ConsoleGame include Console include Score def initialize @game = Game.new end def play puts 'You should to break a secret code ****.' puts @game.check_guess(input_code) until @game.win? || @game.game_start == false @game.score_count puts "Your score: #{@game.score}!" puts 'Do you want to start new game?(y/n)' new_game ? play : save_score end end end
Version data entries
4 entries across 4 versions & 1 rubygems