+ # Get back the previous move, which moved a name piece from [x0,y0] to
+ # [x1, y1] with or without promotion. If the move captured
+ # a piece, it is captured_piece, which is now in hand. The captured_piece
+ # was promoted or unpromoted.
+ #
+ def move_back(move)
+ if (move.sente)
+ hands = @sente_hands
+ else
+ hands = @gote_hands
+ end
+
+ piece = @array[move.x1][move.y1]
+ if move.is_drop?
+ piece.move_to(0, 0)
+ else
+ piece.move_to(move.x0, move.y0)
+ piece.promoted = false if piece.promoted && move.promotion
+ if move.captured_piece
+ move.captured_piece.move_to(move.x1, move.y1)
+ move.captured_piece.sente = move.sente ? false : true
+ move.captured_piece.promoted = true if move.captured_piece_promoted