Sha256: 3ab67f8c598a35bfb68cd1b13b335de86f3f3fe61cb5232e0d2482d42cbdff32
Contents?: true
Size: 495 Bytes
Versions: 4
Compression:
Stored size: 495 Bytes
Contents
require "mastermind/version" module Mastermind COLORS = ["R", "Y", "G", "B", "P", "M"] COLOR_NAMES = { "R" => "(r)ed", "Y" => "(y)ellow", "G" => "(g)reen", "B" => "(b)lue", "P" => "(p)ink", "M" => "(m)agenta" } COLOR_CODES = { "R" => :red, "Y" => :yellow, "G" => :green, "B" => :blue, "P" => :magenta, "M" => :light_magenta } def self.color_option_string(num_colors) COLOR_NAMES.values.first(num_colors).join(" | ") end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
mastermind-nowsiany-1.0.3 | lib/mastermind.rb |
mastermind-nowsiany-1.0.2 | lib/mastermind.rb |
mastermind-nowsiany-1.0.1 | lib/mastermind.rb |
mastermind-nowsiany-1.0.0 | lib/mastermind.rb |