Énoncé Projet 2023-2024 en
Énoncé Projet 2023-2024 en
Project
1
Report content
Due on 05/12/2023
2
Statement
the game:
The player is asked to find the longest valid word from a set of
randomly chosen alphabetical letters, after a finite number of
attempts. A word is valid if it belongs to a list of words entered
in advance from a text file representing the French dictionary.
3
Game rules (1)
1. The user chooses the number of letters in the game (7, 8 or
9 letters) when playing against the computer, and chooses
an even number of letters when playing against a second
player.
2. For each letter, the user chooses the type of letter in the
alphabet (consonant or vowel) and the computer randomly
outputs a consonant or vowel.
5. The longest word may not include all the letters generated by
the machine. Example: the longest words obtained from the
set {T, Z, I, R, O, X, O} are "ROTI" and "TRIO" and have a
size equal to 4.
7. When the player fails to find the longest word, the computer
must display it or all possible words based on this
combination of letters.
5
Game options (1)
The game can be played by one or two players.
1. When we theplay à one, we a two degreesof
difficulty:
7
Game options (3)
2. When played by two:
- One of the of two players chooses the size t of
the word à
found.
- The game ends when one of the two players finds the
longest word.
10
Execution scenario (1)
The user has chosen to play against the computer but made a mistake b e f o r e
typing the right choice (Play to one).
11
Execution scenario (1)
The user was mistaken about the size of the longest word to be found and finally
chose to play with 8 characters.
12
Execution scenario (1)
The user chooses the type of each letter, and the machine generates them
randomly.
13
Execution scenario (1)
The player won on the first move because he found the longest word from the 8
characters proposed by the machine.
14
Execution scenario (2)
The player has chosen to play alone and has attempted the move 9 times
without finding the longest word. He is awarded a score corresponding to the
size of the best word attempted.
15
Execution scenario (2)
The player hasn't managed to find the longest word. The program still
displays the longest words he missed.
16
Execution scenario (3)
This time we want to play against the computer, but also against time. We've
chosen to play with eight characters.
17
Execution scenario (3)
We lost because we exceeded the total time allowed, which is equal to t*t
seconds; t here being equal to 8.
18
Execution scenario (4)
We lost because we exceeded the total time allowed, even though we found the
longest word. Here we choose the second option, which displays all the
possible words that can be obtained from these letters, including the longest.
19
Execution scenario (5)
Despite the time constraint, the player managed to find the longest word on the
fourth attempt, before the 64-second time limit had elapsed.
20
Execution scenario (6)
We've chosen to play in pairs. A first run starts with 8 characters and J1 plays first.
21
Execution scenario (6)
Neither player has found the longest word, but J1 and J2 get two scores
corresponding to their best attempt.
22
Execution scenario (6)
Players are shown the longest words and asked if they want to play another
round. They answer with 'Y' or 'o' if they do, and 'n' or 'N' if they don't.
23
Execution scenario (6)
In round 2, J2 starts first because J1 started first in round 1. J2 wins the round on
the second move by guessing the longest word.
24
Execution scenario (6)
Both players continue to play (they will play 4 rounds). In round 3, no player has
managed to find the correct words, and in round 4, J2 wins the round on the
first move by guessing the longest word.
25
Execution scenario (6)
After playing four rounds, players obtain their final score, which is the sum of the
scores obtained in the various rounds, and the program displays the winner.
26
Execution scenario (7)
Two players. Word size should be positive, non-zero, even and less than 26.
27
Execution scenario (7)
Round 1 is played. J1 and J2 have found some words but they are not the longest.
28
Execution scenario (7)
Round 2 is played. J2 wins because he found the longest word.
29
Execution scenario (7)
The program allows players to see all possible words, including the longest that
can be obtained from this combination of characters.
30
Execution scenario (7)
Round 3 is played. J1 wins, but not with the longest word.
31
Execution scenario (7)
Players can see all possible word combinations, including the longest ones.
32
Execution scenario (7)
The game ended in a draw after three rounds. A table showing all the scores and
the final result is displayed.
33
Good work!
34