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