Scramble is a board game in which players form words on a 15 x 15 grid, crossword-style, using the 7 letter tiles on their racks. You can use Treenimation to make a purely drag-and-drop version of Scramble without doing any coding.
· board: Board-grid object, 15 x 15.
· rack: Rack-grid object of length 7. Boolean property local is set to true, meaning each player has own copy.
· bag: Card-stack object containing 100 letter tiles (Card objects).
· table-top: Card-stack object used for Scrambling. Boolean property local is set to true.
· score-grid: Editable-grid object, 6 rows by 2 columns. An Editable-grid is similar to a StringGrid object in Delphi, except that it can be edited at run-time (and at live-design-time, of course).
The following form is for design purposes only and is hidden at run-time:
· premium-card: Card object containing one Text-box object, indicating the type of premium board square.
· premium-grid: Rack-grid object of length 4. Game designer copies and pastes premium-card into each cell, switches to design mode, and edits Text-box object of each cell and color of each cell. Boolean property infinite is set to true, so that dragging from any cell simply copies the single card in the cell and does not remove it. After creating and editing the premium-grid, the game designer copies and pastes it to the main Scramble form.
· letter-card: Card object containing 2 Text-box objects, a larger one for the letter and a smaller one for the point count.
· alpha-grid: Board-grid object, 6 rows by 5 columns. Game designer copies and pastes letter-card into each cell, switches to design mode, and edits each Text-box object of each cell. Boolean property infinite is set to true.
· bag-grid: Board-grid object, 10 rows by 10 columns. Game designer drags letter tiles from alpha-grid object.
· bag: Card-stack object. Game designer drags all letter tiles from bag-grid object. Boolean property random is set to true, meaning that the Card object obtained by dragging from bag is selected at random. After filling bag, the game designer copies and pastes it to the main Scramble form.
· board: The premium squares are dragged from the premium-grid object to the board object. Afterwards the premium-grid object may be deleted, since a copy exists on the Scramble design form.
· score-grid: The game designer edits all cells in the first column. Entries $P1 - $P4 are replaced by the names of up to 4 players at run-time. The name of the current player is highlighted. "Current" is short for Current Word Score. Anyone who uses a blank (or both blanks) must type in the corresponding letter(s).
· Start of Game: Player names are displayed. Player who goes first is selected at random and corresponding name is highlighted. The rack is initially empty and must be filled by dragging letter tiles from the bag.
· Making a Word: Player drags letters from rack to board.
· Scrambling: Player drags letters from rack to table-top, refills rack by dragging letters from bag to rack, then drags contents of table-top to bag.
· Score Calculation: Player calculates score manually, enters it into "Current" row of score-grid, adds it to his/her score total and replaces old total with new total.
· End of Turn: Player clicks on Next button, whose on-click event handler is pre-configured to call the next-player method of the game-server object.
· Challenging: Any player may challenge by checking the Challenge check box. Whoever has a dictionary looks up the word and reports on word validity in the chat window. If it's not a word, player who made the invalid word must click on Back button (another button with a pre-configured event handler), and take back the invalid word.
· Filling Rack: If no one challenges, player refills rack by dragging letters from bag to rack.