class DsaCodebreakerGame::Code

Constants

COLORS

Available colours red®, orange (O), yellow (Y), green (G), blue (B), Indigo (I), and violet (V).

Public Class Methods

new() click to toggle source
# File lib/dsa_codebreaker_game/code.rb, line 8
def initialize
  4.times do
    self << randomizer
  end
end

Public Instance Methods

randomizer() click to toggle source
# File lib/dsa_codebreaker_game/code.rb, line 14
def randomizer
  COLORS[rand(0..6)]
end