![scrabble game play against computer scrabble game play against computer](http://4.bp.blogspot.com/-qPR6QiduHHw/Va70NjkdlkI/AAAAAAAAeto/EDvQ_--DW2E/s1600/scrabble.jpg)
ScrabbleClient - communicates with the Server's HTTP API to join games, create games, retrieve the changes in game state etc.
![scrabble game play against computer scrabble game play against computer](https://www.gameyum.com/wp-content/uploads/2009/12/play-scrabble-online-free.png)
Server - accepts moves in the form of HTTP requests then uses Game to produce a new game state, returns the changes, and saves changes to the database, this module issues Server-Side Events to clients as a means of more efficient updates for game state XHRClient - an abstraction of cohttp for simpler development of XML HTTP requests HttpServer - an abstraction of cohttp for simpler development of HTTP server APIs mli file provided because it is the entry point of the application) GUI - converts GUI input (from the browser) to moves, uses the Client to process those moves, and reflects changes in the GUI by updating a graphical scrabble board (no. Game - logic to perform actions in a game, such as adding/removing players and performing a move (using Dictionary to validate) Grid - 2-D representation of board characters (including coordinates of score tiles)ĭictionary - English dictionary stored in a data structure (implemented as a Trie)ĪI - logic to generate a move based on an input state (uses Dictionary to find a valid move) Please see the Module Dependency Diagram on the next page. Please note that we provided extensive detailed design information in additional sections at the bottom of this document (this organizational suggestion of adding additional sections was given to us by Professor Clarkson via Piazza) This is elaborated in more detail in the Data section of this document. A trie also allows the AI to quickly determine what words can be made from an existing word on the board by adding some additional tiles to the end of the word. With regards to the comment on the usefulness of a trie - we felt that a trie was necessary because the AI would be doing lookup of many words when evaluating potential moves. įor the user interface, users are able to view their current available letters as well as the current board and are able to perform moves. The API for this server is documented on. Our server is exposed over a public IP address such that any system on Cornell's network can access and play our game via our web application. The scrabble dictionary was implemented by using a prefix tree because the efficiency of the data structure is especially important for the AI.įor the server-client interface, we leveraged several OCaml packages (listed in the External Dependencies section of this document) to persist data across multiple players and multiple instances of games as well as provide an HTTP interface for multiplayer functionality over the internet.
![scrabble game play against computer scrabble game play against computer](https://screenshots.dgtcdn.net/images/t_app-cover-s,f_auto/p/f3be73de-9b22-11e6-bbf8-00163ed833e7/1751720028/scrabble-screenshot.jpg)
Please note that the AI is intentionally delayed so as to allow human users to view the AI moves sequentially. We also implemented an AI to play words that maximize score according to tile/word bonuses and point values of letters. We created a Scrabble game which allows users to play Scrabble, but with added features such as detecting if words are valid or not. English (not OCaml) dictionary manipulation using a Trie.Logging mechanism for viewing server data (formatted as a quasi-HAR file and detailed in the Additional Information section).Keep-Alive mechanism for Server Sent Events (detailed in the Additional Information section).security with generated API keys (detailed in the Additional Information section).We developed a multiplayer (distributed) Scrabble game that can be played with either human or computer players complete with the following features.