Class: GooseGame::Cell::Bounce

Inherits:
Base
  • Object
show all
Defined in:
lib/goose_game/cell.rb

Instance Attribute Summary

Attributes inherited from Base

#gameboard, #num

Instance Method Summary collapse

Methods inherited from Base

#initialize, #to_s

Constructor Details

This class inherits a constructor from GooseGame::Cell::Base

Instance Method Details

#call(player, dice) ⇒ Object



35
36
37
38
39
# File 'lib/goose_game/cell.rb', line 35

def call(player, dice)
  super.tap do |pos|
    @tokens << "#{player} bounces! #{player} returns to #{pos}"
  end
end