首页 > > 详细

辅导 java 编程、辅导 Python 语言程序

1. Introduction
The Type-A-Thon
Out in the woods and up in the hills, the computer science students of University Kalaya (note: any similarities to the real world in this fictional situation are purely coincidental or in your head) have a predicament on their hands. Inside the halls of their violet and pastel faculty building (not purple and white! See? This is totally fictional), and completely isolated from the rest of the university, the students have started to become indistinguishable from each other. Once individuals with their own views, identities, and interests, the terrible years of isolation with nobody but each other have made them all slowly meld into one another, losing their individuality.
To combat this epidemic that has spread amongst their students, the faculty staff has decided to create a series of challenges and competitions among the students, with the hope that the innate talents present in students that can’t be replicated by others show themselves, thereby breaking the cycle of loss of individuality.
Your group has been tasked with the responsibility of creating one such challenge. This challenge is the Type-A-Thon. Contestants are prompted with a randomly generated text and a timer and must type out the same text in front of them as fast as possible until the timer runs out. This will lead the fastest typist to stand out amongst his/her peers, and brings the faculty one step closer to solving its problem.

2. Problem Statement (8 marks) 2.1. Main Game (4 marks)
Let us first start by building the basic blocks of The Type-A-Thon. Here are your main tasks.
Text: The text to be generated consisting of random words from the English dictionary, all in lowercase. The generated text must be large enough that it is impossible for the user to run out of text to type out before the timer runs out. It is advisable that you keep your text pool limited to commonly used words such as “when, there, look, where, feel, consider, try, action, etc.” for simplicity’s sake, but this is not a requirement.
Timer: Creating a 30 second timer that begins counting down as soon as the user types out the first letter of the first word. Once the timer reaches 0, the game stops and the score is calculated.
Score: The final score after the game ends is calculated in Words Per Minute. The WPM is calculated by taking the total amount of characters in the correctly typed words, dividing it by 5, and normalized by 60 seconds. Along with the WPM, the program keeps tracks of the number of mistakes made by the user, regardless of if the user backspaced to correct the mistake or not. An accuracy percentage score is also displayed.
Gameplay: Finally, we get to the actual gameplay. Players are required to type out the prompted text using their keyboards while the timer is active. If a player makes a typing error, they can either backspace to correct the error (which takes time) or press space bar and move on to the next word (keep in mind that no points will be given for incorrectly spelled words). Once the level is over, players are given the option to either repeat the same text prompt or start again with a randomly generated prompt.

2.2. Alternate Gamemodes (2 marks)
What game can be called fun with only 1 gamemode? Therefore for this assignment, we’re going to spice it up a little bit. The player should be given the option to choose between different gamemodes as such:
2.2.1. Timed
This is the default gamemode with the same gameplay explained in the previous section. However, we would like you to add the following features.
• The player can choose if they want punctuation to be included within the randomly generated text. This would mean randomly generated commas, open and close quotation marks, exclamation and question marks, and periods.
• The player can choose to edit the timer to be either 15, 30, 45, or 60 seconds. This should be done without affecting the score calculation process.
2.2.2. Words
In this alternate gamemode, the player is presented with a limited number of words, and is given the choice between 10, 25, 50, or 100 words, all generated at random. Instead of a timer, a stopwatch is used to calculate how long the player takes to complete the generated text, and the score is calculated similar to the normal game.
2.2.3. Quotes
In this gamemode, the player presented with a quote at random from a movie, TV series, anime, game, book, song, or any other form of media. The list of quotes can be chosen by you and stored in a text file for generation. The time and score of this gamemode is calculated similarly to that of the last alternate gamemode. It would also be nice to include the source of the text at the end of the round along with the score.

2.3. Profiles (2 marks)
To serve the purpose of determining the best Type-A-Thon player, you must create a feature for players to create accounts that store their scores.
How you implement the account registration, storage, login, and logout will be entirely up to you. However, you must include the following features:
2.3.1. Player Profiles
Each registered account must come with a player profile with details of the player. Each player is able to view their own as well as other registered players’ profiles. Each player profile must include:
• Their average WPM and accuracy scores (all-time).
• Their average WPM and accuracy scores (last 10 games).
You are free to include anything else you may think of. 2.3.2. Leaderboards
The inclusion of a leaderboard is important to the functioning of this game. You must include a leaderboard based on the average WPM (last 10 games) of all the registered users. The leaderboard must be updated based on the recent player scores. Additionally, users are able to view the profiles of other players from the leaderboards screen.
3. Sample Input & Output
Sample output of the classic mode

Sample output of the Quotes gamemode
4. Extra Features (4 marks)
You are presented with 4 extra features to choose from. Please note that the maximum marks you can get for this segment is 4.
4.1. Correction Facility (2 marks)
The correction facility is an optional alternate gamemode. In this gamemode, you are required to generate a random text using the player’s most commonly mistyped words. The rest of the rules are similar to the classic gamemode. Additionally, include a list of the user’s 10 most misspelled words in their profile as a badge of shame.
4.2. Sudden Death (1 mark)
The sudden death is an alternate gamemode where if the player makes a single mistake, the game ends and the timer stops, and the score is calculated based on the typed words and the elapsed time. If you choose to include this extra feature, you must also add the “sudden death score” category separately on the user’s profile.
4.3. Performance Metrics (2 marks)
While it is nice to see your WPM and accuracy score at the end of each game, sometimes that isn’t enough data. So for the data science nerds out there, this extra feature is for you.
For this extra feature, you are required to record the WPM at each individual second of the runtime of the game, and then graphing out the WPM of each second of the game to show the progression during

that current game. Make a separate graph for the accuracy score as well.
4.4. GUI (1 mark)
For this extra feature, you are given points for putting in extra effort in making your project look presentable. This is a game after all. From everything to the log-in screen, account creation, profile, leaderboards, and especially the gameplay screen, the finishing touches of a GUI (which doesn’t HAVE to be an actual GUI, a clean CLI is sometimes even better) make all the difference.
5. Questions
If you have any questions (or threats) that you feel need to reach the creator of this assignment, you can reach out to me, Ahmed Ibrahim, on my email or WhatsApp below:
aeiouhmed@gmail.com
+60147692109
If you need to use any references, check out MonkeyType or TypeRacer.

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!