Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Group project - Scramble Design document Banzatti Luca, Blancs Virginie, Castellano Andrea, Chersich Michele, Pavan Andrea November 25, 2010 1 Introduction Scramble is a game inspired by Scrabble, a famous word game where 2 to 4 players score points by forming words from individual lettered tiles on a game board marked with a 15-by-15 grid. Our game will be a little bit different : it is a single player game with a 5x5 grid. The goal is slightly the same : the player has to find as many words as possible by combining letters inside the game board. He can select only letters that are strictly close to each other (up, down, left, right and diagonals). Functionalities In our version of this game, we would like to implement these functionalities, and maybe also some others : • A dictionary : a directory of our document will contain a full English dictionary, so that the program will be able to recognize actually existing words. This dictionary will be either in txt or in rkt. • A board : a structure board which will be a list of lists of cells containing the letters. • Cells : the structure cell will contain a random letter and a value (that is its position in the board. • Conditions-on-click : which determines that the next click will be possible only on the cells near to the last clicked one. • Print-letter : which saves the letter of the clicked cell in the text box (a list of letters). • Check-word : which checks whether the sequence of letters currently displayed in the text box is an existing word. This will be done through a binary-search-tree on the dictionary file. • On-click : in the visual interface, the click of the mouse on a cell will recall 3 functions: 1. Conditions-on-click 2. Print-letter 3. Check-word 2 • Score : is a structure containing a single number as field, which is incremental. Each existing word displayed increases the number proportionally to the number of letters of the word: after the first letter (which counts zero points), each other letter adds 10 points. • Player : a structure containing an editable name and a game, which records the scores • Time : a timer that decreases the time each second. • Game over : when the Time arrives to 0 the game ends. Data analysis and definitions During the creation of our project we will need to define a lot of functions, lists and structures. Some of those will be: • cell : a strcuture with two fields, a value and a letter (make-cell value letter) • row : a structure that contains a list of cells (make-row list-of-cells) • board : a structure that contains a list of rows (make-board list-of-rows) • dictionary : 26 rkt files that are all lists of words • on-click : a function that allow to click on our board and picks up a letter. The function will recall some other functions • print-letter : the function picks up a clicked letter and print it. • check-word : a function that picks up the printed word and checks, by using an algorithm (maybe the binary search tree), if the word exists in the dictionary • score : a function that picks up every point made by the confirmation of that a word exist and give to the player a score and increase everytime the player find a word • timer: a function that works on tick and decrease the time of game • player : a structure with two fields the name and the score (that increase) (make-player name score) • game-over: this functions checks if the time is equal to 0 or if it’s not possible to create a new word and stops the game. 3