3/15/10

Undo

Player may click "Undo" menu item or type Ctrl+Z to execute undo operation.

When a player moved piece successfully, current piece positions will be stored in a list. Since there are 32 pieces in total. So, every bout will cost int[32] memory bytes.

Game doesn't write the list to disk file. Thus, it's better to allow players undo limited moves. But, at this point, assume that Java supports infinite memory allocation. In other words, game allows players to undo every move they did.

No comments:

Post a Comment