Bug 230

Summary: Incorrect undo result for some special condition
Product: CS3343 group25 chess game Reporter: Andy <dotafterfootball>
Component: chess gameAssignee: Andy <dotafterfootball>
Status: CONFIRMED ---    
Severity: critical CC: kmchan497-c
Priority: ---    
Version: unspecified   
Hardware: PC   
OS: Mac OS   

Description Andy 2017-11-29 10:42:44 HKT
Relating code:

public void undo() {
		chessboard.initialize(x, y, chessboard.getPiece(x_target, y_target));
		chessboard.initialize(x_target, y_target, piece);
		addRedoCommand(this);
}

This is the undo function in CmdMove class. It will result in incorrect undo results in some cases like a pawn changes to queen since it only undo the position information instead of the full information of pieces.