Presentation is loading. Please wait.

Presentation is loading. Please wait.

Java Finish command line guessing game, then….

Similar presentations


Presentation on theme: "Java Finish command line guessing game, then…."— Presentation transcript:

1 Java Finish command line guessing game, then…

2 GuessingGameUI extends javax.swing.JFrame
GUI Guessing Game GuessingGame GuessingGameUI extends javax.swing.JFrame GuessingGame target: int gameOver: boolean statusMsg: String - game: GuessingGame target: int gameOver: boolean + GuessingGameUI() + btnNewGameActionPerformed(evt: java.awt.event.ActionEvent): void + btnGuessActionPerformed(evt: java.awt.event.ActionEvent): void + processGuess(guess: int) + getMsg(): String + isGameOver(): boolean + newGame(): - setTarget(): void GuessingGameApp <no fields> + main(args: String): void

3 Important Points Remember that your GuessingGame class doesn't just run from start to finish, it responds to the requests from the UI Note that there is no main loop! Get your parameters and return types correct for you GuessingGame methods The UI passes information to the GuessingGame and updates the UI on the basis of what it gets back

4

5 Extending the game Ask the user for confirmation if they start a new game before the old game was finished Allow the user to set the upper bound for the random target Keep a count of the number of tries and display it on the GUI Keep a list of high scores (requires file handling, which you have not been taught but which is on the blog…) Other ideas? Please share…


Download ppt "Java Finish command line guessing game, then…."

Similar presentations


Ads by Google