Sha256: 97ce8aea205183fd1351c5e033a976701c57beb12bbbdf12506dd9c7bff1cc7f
Contents?: true
Size: 1.84 KB
Versions: 2
Compression:
Stored size: 1.84 KB
Contents
# frozen_string_literal: true module Codebreaker class Messages class << self def logo puts " ]]]] ]]]] ]]]]] ]]]]] \n" \ "]] ]] ]] ]] ]] ]] ]] \n" \ "]] ]] ]] ]] ]] ]]]] \n" \ "]] ]] ]] ]] ]] ]] ]] \n" \ " ]]]] ]]]] ]]]]] ]]]]] \n" \ "\n" \ "]]]]] ]]]]] ]]]]] ]]]] ]] ]] ]]]]] ]]]]] \n" \ "]] ]] ]] ]] ]] ]] ]] ]] ]] ]] ]] ]] \n" \ "]]]]] ]]]]] ]]]] ]]]]]] ]]]] ]]]] ]]]]] \n" \ "]] ]] ]] ]] ]] ]] ]] ]] ]] ]] ]] ]] \n" \ "]]]]] ]] ]] ]]]]] ]] ]] ]] ]] ]]]]] ]] ]] \n" \ "\n" end def welcome puts 'Welcome to the Codebreaker game! Please choose one of the next options:' end def run puts "\n" \ "1 - play \n" \ "2 - high scores \n" \ "0 - exit \n" \ "\n" end def play puts "Let's go! \n" \ "\n" \ "1 - hint \n" \ "0 - end \n" \ "\n" end def win(answer) puts 'Congratulations! You are the winner!', "It was #{answer}.", "\n" end def lose(answer) puts 'Sorry, you lose(((', "It was #{answer}.", "\n" end def tries_left(tries_left) puts "#{tries_left} tries left.", "\n" end def hint(hint, hints_left, tries_left) if hint puts "Secret code contains #{hint}.", "#{hints_left} hints_left." tries_left(tries_left) else puts 'No hints left.', "\n" end end def bye puts 'Good luck!' end def wrong_option puts 'Wrong option!' end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ep-codebreaker-0.2.1 | lib/ep-codebreaker/messages.rb |
ep-codebreaker-0.2.0 | lib/ep-codebreaker/messages.rb |