From: Erik V. <eri...@hc...> - 2006-02-05 21:44:20
|
I have committed code that implements an first version of the Game End logic. 1. The broken status of the Bank is detected in the Bank class. 2. GameManager checks at the end of each OR, or at the end of the set of ORs (that is game-dependent) whether the bank has been broken at any time before (Bank.isBroken()). If so, the gameOver flag is set. 3. ORPanel.updateStatus() now checks each time whether the Bank has broken (by calling Bank.isJustBroken()). If true, a pop-up is shown with the message "Bank is broken. The game will be over after the current set of ORs." (this message is of course not applicable in all cases, I will fix that later). 4. ORPanel.updateStatus() now also checks each time when the game has ended by calling GameManager.isGameOver(). If true, a pop-up "GAME OVER" is shown. Further wrapping up (such as displaying the player ranking and stopping the program) still to be done. This is a very simple and not yet complete approach of the game end; we will see if it works or should become a bit more sophisticated. Please note that Bankruptcy is not handled yet. In addition, I have fixed some issues in the ORWindow, such as the disappearing message bar and the not-showing of laid tile and token locations. Erik. |