Exercise
ScrambleA GitHub Classroom Assignment
This assignment must be accepted on GitHub Classroom
Objective
Using the Vue Framework, create an interactive version of Scramble.
Game Play
When the game begins, the player will be presented with a word that has been scrambled. The player will make a guess on the word by typing into the provided textbox.
If the guess is correct, the player will earn a point and a new scrambled word will appear. If the guess is incorrect, the player will receive a strike and the scrambled word will remain.
A pass button will allow the player to skip on a word, and receive a new scrambled word. The player will only have a limited number of passes.
Each time a word is guessed correctly or is passed the word is removed from the game list and will not appear again during that specific game.
The game ends when the player went through all of the words in the game list OR the player has received the maximum number of strikes. At which time, the player should be presented with an option to play again.
Requirements
The following requirements must be met in order to complete the assignment successfully:
- The repository containing the starter files must be cloned from GitHub. The repository will contain an
index.html
file,styles.css
file, and ascramble.js
file. You may change any of the files as necessary. - An array of words must be created. The words should not include spaces or special characters. There must be at least 10 words in the array.
- The player must be able to make a guess by typing into a textbox and hitting enter. Once a guess has been made, correct or incorrect, the textbox should be cleared. Making a guess should NOT cause a page refresh.
- If the guess is correct, a new scrambled word should appear.
- If the guess is incorrect, the current scrambled word should remain.
- After each guess, the player should receive a response telling whether the guess was correct or incorrect.
- After each guess, the number of points or strikes should be updated and displayed for the player.
- If the player clicks on the pass button, and the player has at least pass remaining, the current word be removed and the next scrambled word should be displayed.
- If the player makes it through the entire list of words OR receives the maximum number of strikes , the game should end and display the option for the player to play again.
- If the player chooses to play again, the game should restart the game, clearing all previous points, strikes or used passes. The restart should be accomplished without a page refresh.
Tips
- The provided
shuffle()
function can be used to shuffle the words array and to scramble the individual words. - The use frameworks or libraries to enhance user experience is allowed.
Shuffle Function
The following screencast shows how to use the provided shuffle()
function.
Example
Rubric
Task | Points |
---|---|
Properly implement guess feature | 7 |
Properly track and display points and strikes | 3 |
Properly implement pass feature | 7 |
Properly restart the game | 3 |
Total | 20 |
Submission
- Create a commit with the message "Completed the Scramble Assignment"
- Push to GitHub
- Submit the URL to your GitHub Repository to the Scramble assignment on BrightSpace
Plagiarism Honor Code
By making the submission you also agree to the Algonquin College Student Attestation of Academic Integrity below:
I hereby declare that the work I submit throughout the duration of this course/program will be my own work.
I understand that plagiarism, whether done deliberately or accidentally, is defined as presenting someone else’s work, in whole or in part, as one’s own, and includes the verbal or written submission of another work (for example, ideas, wording, code, graphics, music, and inventions) without crediting that source. This includes all electronic sources (for example, the Internet, television, video, film, and recordings), all print and written sources (for example, books, periodicals, lyrics, government publications, promotional materials, and academic assignments), and all verbal sources (for example, conversations and interviews).
I understand that the facilitation of plagiarism, that is, one student sharing his or her work with other students, is also considered an act of plagiarism.
I understand that contravening Algonquin College Policy AA 20 - Plagiarism will result in an academic sanction(s) as described in this directive.