Assignment 2: Scrabble Scorer
For your second assignment, we’ll ask you to modify and improve our Scrabble Scorer program. Did you think you were going to work on Mars Rover code already? That will come next!
We want you to update our program that asks a user for a word and outputs a score. Your final version will have three scoring algorithms and allow a user to interactively choose which algorithm to use. We’ve provided some starter code that includes the official Scrabble scoring point system and we’d like you to make some modifications to improve it.
The requirements below are what your assignment should look like when it’s time to submit. Rome wasn’t built in a day and neither was Scrabble.
This assignment is broken down so you can complete small pieces as you go. You need to move sequentially starting with Part A below. You’ll have a much more enjoyable time writing this program if you read this entire page before even opening your code.
- Write an
initialPrompt()function that asks a user to input a word.
- Have the program return a score for the word using
- Add additional scoring algorithms and store them in the
- Create a
transform()function that takes in the
oldPointStructureobject and returns a
- Use the
runProgram()function to serve as the starting point for your program.
Fork and clone the starter code repo .
You only need to pay attention to one file here,
file is still some more starter code that you don’t need to touch. We’ll point out what you
should be modifying here to write your Scrabble Scorer program.
To run the starter code as is, take the following steps:
- Open the terminal in Visual Studio Code.
- Run the command,
- Once that is complete, run the command,
node index. You’ll see a message printed to the console:
$ node index Let's play some Scrabble!
If you don’t see this message printed and have exhausted your troubleshooting skills, reach out to your classmates or course staff ASAP so you can get started with the real coding.
Time to code!