CPSC 170 Program 1: Solitaire Scrabble

Overview

In this assignment you will write a simple version of single-user Scrabble. Your program should let the user set the hand size, then show the user a 15x15 Scrabble board with numbered rows and columns and some symbol to indicate that all spaces are empty. Then show the user their hand, and ask them what word they want to play, where they want to play it, and in what direction. Display the updated board, then show the user what tiles they have left, refill their hand with new tiles, and show them their new hand. Repeat until the user asks to quit. For example, the first couple of rounds might look like this:
************ Welcome to Scrabble!! *****************

How many tiles would you like in a hand? 7

   1  2  3  4  5  6  7  8  9  10 11 12 13 14 15 
1  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
2  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
3  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
4  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
5  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
6  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
7  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
8  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
9  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
10 *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
11 *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
12 *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
13 *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
14 *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
15 *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  

Your hand: A  G  H  Q  R  S  W  

Enter word: RAG
Enter row: 3
Enter col: 8
Enter (d)own or (a)cross: d

   1  2  3  4  5  6  7  8  9  10 11 12 13 14 15 
1  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
2  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
3  *  *  *  *  *  *  *  R  *  *  *  *  *  *  *  
4  *  *  *  *  *  *  *  A  *  *  *  *  *  *  *  
5  *  *  *  *  *  *  *  G  *  *  *  *  *  *  *  
6  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
7  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
8  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
9  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
10 *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
11 *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
12 *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
13 *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
14 *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
15 *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  

Remaining tiles:  H  Q  S  W
New hand: D  E  H  Q  S  T  W

Keep playing? (y/n) y

Enter word: HEAD
Enter row: 4
Enter col: 6
Enter (d)own or (a)cross: a

   1  2  3  4  5  6  7  8  9  10 11 12 13 14 15 
1  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
2  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
3  *  *  *  *  *  *  *  R  *  *  *  *  *  *  *  
4  *  *  *  *  *  H  E  A  D  *  *  *  *  *  *  
5  *  *  *  *  *  *  *  G  *  *  *  *  *  *  *  
6  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
7  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
8  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
9  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
10 *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
11 *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
12 *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
13 *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
14 *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
15 *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  

Remaining tiles:  Q  S  T  W
New hand: B  D  Q  S  T  V  W

Keep playing? (y/n) n
Bye!

Some important notes:

Program Structure

This program is not difficult, but it will take some careful organization. I strongly recommend that you structure your program around the following four classes:

Good Advice