Game definitions

You can add or change the crossword games Elise analyzes by modifying the contents of the "game.definitions" file in your Elise install directory. There are several example games in the file with comment lines explaining how the definitions work.

Every game definition must begin with a "Game" line. This line must give a name to the crossword game. This name must be enclosed in double quotes (and must not contain double quotes.) This is the name displayed in the "Start game" dropdown.

Game defintions may contain comment lines. These lines begin with a semicolon ";". The rest of the line will be ignored by Elise. Comments should be on their own lines; do not place a comment on a line with other options.

Every game definition must end with the line "GameEnd". In between "Game" and "GameEnd" there are options that specify the special rules of the game, the makeup of the tile well, and the game board.

Here is more information about each of the options available in an Elise game definition:

anagrams

If this option is present, then any play that anagrams into a valid lexicon word is acceptable (as in Clabbers). Otherwise, only plays that include valid words are acceptable.

board

This option is necessary for any crossword puzzle game, but may be set using "copy".

"board" appears on a line by itself, and then must be followed by a number of lines equalling the number of rows in the board. Each row line must have a number of characters equal to the number of columns in the board. Each line represents the contents of the corresponding row of the board (the first line is the top row, the last is the bottom.) The characters used to represent the bonus squares are those defined by the "bonus" options.

bingobonus

This option has one numeric argument. It defines the point bonus for a "bingo" (a move that uses all tiles on the rack.)

boardsize

This option has two numeric argument. The first gives the number of columns in the game board. The second gives the number of rows in the game board. This option must appear before the board is defined.

The maximum allowable board size is 32 × 32.

bonus

"bonus" is used to define the value and appearance of different square types in the crossword game. At least one "bonus" is required for any crossword game, but can be set by using "copy". The "bonus" definitions must appear before the "board" definition.

"bonus" has five arguments. The first is a text argument that defines the behavior of the square. "none" means no special behavior for this square. "#ws", where "#" is an integer from -99 to 99, makes the bonus square a "# word score" space. "#ls", where "#" is an integer from -9 to 19, makes the bonus square a "# letter score". "empty" means that no tiles can be placed in this square -- it is effectively "empty space" and will be drawn as such in Elise. (This allows for non-rectangular boards.)

The second argument is a typewriter character used to represent this bonus square in any text representations of the board. This cannot be whitespace and must be unique.

The third, fourth and fifth arguments are a hexadecimal R/G/B triplet representing the color that should be used when drawing this square on the board. The value for each argument should range from 00 to FF and must be separated by spaces.

copy

This copies all of the data (except the game name) from the named crossword puzzle game into the current game. The crossword game must have double quotes around its name, and must have been defined earlier in the file.

Subsequent lines then "tweak" the game.

copyboard

This copies only the board from the named crossword puzzle game into the current game. The crossword game must have double quotes around its name, and must have been defined earlier in the file.

defaultwordlist

Gives the filename (surrounded in double quotes) of the default word list for this crossword game. If a different word list is in memory and a game of this type is begun in Elise (via "Start game...") then the default word list will be loaded. (Note that "New game (same type)" does not reload the default word list.)

mintilesexchange

This option has one numeric argument, which is the minimum number of tiles remaining in the bag for which a tile exchange is still allowed.

numplayers

This option is required for all crossword games (but can be set in a game using "copy").

numplayers has two integer arguments that must appear on the line with it. The first argument is the minimum number of players that can participate in this crossword game; the second argument is the maximum number of players.

openracks

This option has no arguments and appears on a line by itself.

In a game with this option, every rack is displayed openly and every player knows what tiles are on every other player's racks. By default (without this option), racks are hidden from other players.

When a game is played with open racks, the following changes in Elise gameplay and the interface occur:

  • Elise will use knowledge of the other players' tiles in simulation.
  • Since Elise does not need to use rack distribution guesses in an open rack game, these guesses are not made.
  • All tiles on racks are shown in the UI.
  • The "set known tiles on opponent's rack" option is greyed out (you already know all of the tiles.)
  • The "display well contents" shows exactly what tiles are in the well, unlike in a closed-rack game, where the tiles shown include those on your opponents' racks.
  • "Set rack..." now allows you to edit any player's rack, not only the current player's. (Since the information is used in simulation, it's important to be able to edit it in an open rack game.)

racksize

This option has one numeric argument. It defines the default number of tiles on the players' racks.

startsquare

This option is required for all crossword games (but can be set in a game using "copy").

startsquare has two numeric arguments. The first is a column number (with the leftmost column numbered 0), the second is a row number (with the topmost row numbered 0). This row and column represent the square through which the first move of the game must pass.

tile

The "tile" options define the makeup of the game's well. At least one is necessary for every crossword game (but they may be set using "copy").

Each "tile" has four arguments. The first is the letter that the tile represents. As of 0.0.1, only A-Z and "?" (for the blank) are accepted. The second argument is the number of such tiles in the bag at the start of the game. The third argument is the point value of the tile. The fourth argument is the category number of the tile (this has no effect in 0.0.1 but is reserved for future use; set it to 0 for now.)

Back