Practice 3 (Year 3 Sem 1)

Practice 3 is the third practice in semester 1 of year 3, and the thirs practice in the total of year 3. It is a practice for intro to JavaFX, and is considered to be moderately easy.

Description
Feeling motivated with your new JavaFX Skills, and missing your previous internship job as a game developer, you wish to harness the new skills learnt to code some simple games to entertain your colleagues. Complete the two games below using JavaFX.

Unlocked after completion

 * OCD (Score at least 60% for Extra Practice 3: Intro to JavaFX)
 * FX Game Master (Score at least 80% for Extra Practice 3: Intro to JavaFX)

Files

 * wordlist.txt
 * hilo_highscore.txt

Side note
Rest of files are available [[Media:Y3S1P3.zip|here]].

Note that it might say the files are malicious. They are not, as the zip file contains only the pre-provided files from Coursemology.

Question
You will code a simple Hi-Lo Game using JavaFX program (using pure code). Your FX program should works as follows:  Randomly generate a secret number between [0,100]. Have a textbox for user to enter his/her guess. For each guess, inform the user if the guess is too high, or too low. This is repeated until the user finally guesses the number.  Each gameplay is only entitled to 10 guesses. User loses if he/she exceeds the number maximum number of tries.  Display the message "You lost! Please try harder!" if user lost.  Display the message "Congrats! You got it in X guesses! Please click on Hall of Fame button if you wish to have your high score recorded" if user won.</li> After the game ends, the user should have the option to play again by clicking on a "Play Again" button (and the process will restart).</li> </ul> Implement a hall of fame (i.e. high score board) as follows: <ul> Have a button (Hall of Fame) in the main program.</li> If user clicks on the hall of fame button, a new stage will be popped up.</li> There should be a textbook for user to enter his/her name and a button to submit his/her name if the user had won. The button only be enabled if the user won the game (use the <span style="background-color: transparent; color: var(--black-750); font-family: inherit;      margin: 0px;      "> method). </li> Write the high score into a text file hilo_highscore.txt (download sample for format).</li>  <span style="background-color: transparent; color: var(--black-750); font-family: inherit;     margin: 0px;      ">Have a TextArea control to display the list of high scorers (TextArea comes with a scroll bar). Set the TextArea to be NOT editable ( TextArea has a <span style="color: var(--black-750); font-family: inherit; background-color: transparent; margin: 0px;"> <span style="color: var(--black-750); font-family: inherit; background-color: transparent; margin: 0px;"> method). The high score shown should reflect the latest player who won. </li> </ul> You have the autonomy to layout the UI in a suitable way. You may wish to readup on suitable controls here: http://tutorials.jenkov.com/javafx/index.html You should demo your end product to your teacher before you finalize submission.</b>  Sample UI Screenshots (You are allowed to layout / make improvements to the below UI in a suitable way)  You should demo your end product to your teacher BEFORE you finalize submission.</b> Zip your ENTIRE project folder and submit that zip file:</b>



Question
You will code a simple Hangman Game using JavaFX program (using pure code</b>). Your FX program should works as follows: <ul> Read a list of words from wordlist.txt into an Arraylist </li> Randomly select one of the word loaded as the secret word.</li> Allow user to key in a character to guess.</li> If user guesses correctly, display the position of the character guessed in the word e.g. _ e _ _ _ </li> Allow user to key in an entire word to guess. If the user guesses the word wrongly, it is counted as a try. Otherwise, the user wins immediately.</li> User has 6 attempts to guess a character before he/she loses (user may guess the word anytime and guessing word is not counted as a guess). With every guess, inform user how many guesses he/she is left with (using a label to display). After 6 guesses, user may do a final guess of the word before you determine if user win or lose.</li> <li>Game terminates if user has won or lost.</li> </ul> Implement a Hall of Fame similar to that in Q1. You have the autonomy to layout the UI in a suitable way. You may wish to readup on suitable controls here: http://tutorials.jenkov.com/javafx/index.html <b style="color: rgb(255, 0, 0);">You should demo your end product to your teacher before you finalize submission.</b>  Sample UI Screenshots (You are allowed to layout / make improvements to the below UI in a suitable way)      <b style="background-color: rgb(255, 255, 0);">You should demo your end product to your teacher BEFORE you finalize submission.</b> <b style="background-color: rgb(255, 255, 0);">Zip your ENTIRE project folder and submit that zip file:</b> <b style="color: rgb(255, 0, 0);"> </b>