lib/tak/board.rb
# Distributes pieces from a stack move across the board
#
# @param move [Tak::Move]
#
# @return [Boolean]
Distributes pieces from a stack move across the board
Distributes pieces from a stack move across the board
def distribute_pieces(move)
      stack = pieces_at(*move.origin).pop(move.size)
      move.coordinates.each do |(x, y)|
        @board[x][y].push(stack.pop)
      end
      true
    end
def distribute_pieces ( move ) stack = pieces_at ( * move . origin ) . pop ( move . size ) move . coordinates . each do | ( x , y ) | @board [ x ] [ y ] . push ( stack . pop ) end true end
Distributes pieces from a stack move across the board
Distributes pieces from a stack move across the board
None
Boolean
move
<not_specific>
<not_specific>
None