Class: LoadedDie

Inherits:
Object
  • Object
show all
Includes:
Auditable
Defined in:
lib/dry_game/loaded_die.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Auditable

#audit

Instance Attribute Details

#numberObject (readonly)

Returns the value of attribute number.



6
7
8
# File 'lib/dry_game/loaded_die.rb', line 6

def number
  @number
end

Instance Method Details

#rollObject



8
9
10
11
12
13
# File 'lib/dry_game/loaded_die.rb', line 8

def roll
  numbers = [1,1,2,5,6,6]
  @number = numbers.sample
  audit
  @number
end