Task 5: Submitting Your Work
Before you submit your work, you should test out your code.
First run some test words with your program. Here are some words you can use to test your code:
Scrabble= 14 points using Scrabble, 8 using Simple Score, and 12 using Bonus Vowels.
Zox= 19 points using Scrabble, 3 using Simple Score, and 5 using Bonus Vowels.
Review the code for each test word to see that it works as expected. Here is an example of the output you may see.
$ node index Let's play some Scrabble! Enter a word to score: rum Which scoring algorithm would you like to use? 0 - Simple: One point per character 1 - Vowel Bonus: Vowels are worth 3 points 2 - Scrabble: Uses scrabble point system Enter 0, 1, or 2: 1 Score for 'june': 8
Your starter code came with a suite of tests your TA can use to verify certain behaviors in your code. These tests can be found in the folder named
test. To see how your code will do with these tests, you can run the command
npm test in the terminal. If you see a test failed and you are not quite sure why, we encourage you to reach out to course staff for assistance.
Submitting Your Work
Follow the submission instructions in Assignment 0 to submit your work. Remember to copy the link to your repo and paste it in the submission box on Canvas so your TA knows you are ready to have your work graded.
- Currently, the prompts accept ANY input values. The user could enter something other than 0, 1, or 2 when selecting the scoring algorithm, and they could enter numbers or symbols when asked for a word. Modify your code to reject invalid inputs and then re-prompt the user for the correct information.
- Score words spelled with blank tiles by adding
' 'to the
newPointStructureobject. The point value for a blank tile is