class GooseGame::Cell::Bounce

Public Instance Methods

call(player, dice) click to toggle source
Calls superclass method GooseGame::Cell::Base#call
# 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

Private Instance Methods

dest() click to toggle source
# File lib/goose_game/cell.rb, line 45
        def dest
  FINISH
end
position() click to toggle source
# File lib/goose_game/cell.rb, line 41
        def position
  FINISH - num % FINISH
end