Chris Pollett > Students > Abraham

    Print View

    [Bio]

    [Blog]

    [CS 297 Proposal]

    [Del 1 - Scrabble Notation]

    [Del 2 - Human Player]

    [Del 3 - Possible Word Retrieval]

    [Del 4 - Simple AI player]

    [CS 297 Report_PDF]

    [CS 298 Proposal]

    [CS 298 Report_PDF]

    [CS 298 Presentation_PDF]



























Deliverable 2: Human Scrabble player using Trie data-structure

This deliverable is used to play scrabble game using human players only. A 15x15 square Game board has been created to place the words. Out of the 100 tiles in the tile bag, 98 tiles are English alphabets and two tiles are blank. Blanks can be replaced with any letter, however, it cannot earn any points.

In this program, we use a trie data structure to store the entire dictionary. The program can accept 2-4 players and each player is provided with a shuffled rack of 7 tiles. Once the player enters the direction of placement, coordinates of gameBoard to place the letter and, tiles from the rack, the program validates these input and see if the play is a legal one. If it is a legal play, then the words formed are validated by checking its existence in trie data-structure.

Running the program: Each player is supposed to input the following arguments as csv to run the program.
  1. Arg1: Direction of play (Horizontal-H or Vertical-V)
  2. Arg2: Board Y coordinate ( A- O)
  3. Arg3: Board X coordinate ( 0- 14)
  4. Arg4: Tiles from the rack

Download HumanPlayer.zip