FontysICT-sem1

Training - List methods - Guess the number

We are going to create a game where the player has to guess which numbers appear in a randomly drawn sequence. Let the player choose in advance between which boundaries the numbers can be and give him or her the possibility to set the number of drawn numbers. The maximum minus the minimum must be twice as large as the number of numbers to be drawn. Otherwise, the game is too easy.

When the game is started with the game parameters entered by the player, guessing can begin. It will have to be checked whether the number entered by the player appears in the list of random numbers. If so, it must be removed from the list. If not, the application must let the player know.

When all numbers have been removed from the list, the application must notify the player that they have won. If you want to go all out, you can also give the player a number of lives. With each mistake the user makes, one life is deducted from the total. When the number of lives reaches 0, the player has lost and the game displays Game Over.

Try to make the game look visually appealing.