Sha256: 3ce8305539f452bb3aae53291b750e134f214c24627060d62d3930c8c3fbf07a

Contents?: true

Size: 1.64 KB

Versions: 2

Compression:

Stored size: 1.64 KB

Contents

# frozen_string_literal: true

module Codebreaker
  module 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, tries)
        puts 'Congratulations! You are the winner!'
        puts "It was #{answer} and you did it in #{tries} tries", "\n"
      end

      def lose(answer)
        puts 'Sorry, you lose(((', "It was #{answer}"
      end

      def tries_left(tries_left)
        puts "#{tries_left} tries left", "\n"
      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.1.2 lib/ep-codebreaker/messages.rb
ep-codebreaker-0.1.1 lib/ep-codebreaker/messages.rb