Method: Upwords::MoveManager#undo_last
- Defined in:
- lib/upwords/move_manager.rb
#undo_last(player) ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/upwords/move_manager.rb', line 27 def undo_last(player) if @pending_move.empty? raise IllegalMove, "No moves to undo!" else player.take_from(@board, *@pending_move.pop[0]) # TODO: make Tile class end end |