Class: StudioGame::Die

Inherits:
Object
  • Object
show all
Includes:
Auditable
Defined in:
lib/jj-studio_game/die.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Auditable

#audit

Instance Attribute Details

#numberObject

Returns the value of attribute number.



8
9
10
# File 'lib/jj-studio_game/die.rb', line 8

def number
  @number
end

Instance Method Details

#rollObject



10
11
12
13
14
# File 'lib/jj-studio_game/die.rb', line 10

def roll
    @number = rand(1..6)
    audit
    @number
end