JavaTerrace - a Java applet of the board game Terrace


News Flash! The inventors of Terrace liked JavaTerrace so much, they sent me an autographed Terrace 6x6 set!


Terrace is my favorite strategy board game, and Java is a neat programming language, so I've written an implementation of Terrace in Java. Pull up a chair with a friend (or three) and have fun!

Note: It may take a few seconds for the graphics to load, so please be patient.

You need a Java-enabled browser to play JavaTerrace on this page.

Source code and images Copyright 1997-2007 by Karl von Laudermann.

Note: The latest version is 3.12, but the version running above is actually 2.41 since many browsers can't handle newer Java applets. To run the latest version, which can also be run as an application, please download JavaTerrace.zip.



Terrace Rules

Never played Terrace before? No problem! The rules are simple, even though the gameplay can be complex.

Each turn consists of moving a piece in one of three ways:

  1. A piece can move to any empty space on the same terrace (L-shaped level) as long as it does not have to pass over a piece of a different color to get there.
  2. A piece can move onto an adjacent empty space that is on a different terrace. It does so by moving one step straight or diagonally up onto a higher terrace, or one space straight (not diagonally) down onto a lower terrace.
  3. A piece can capture another piece that is diagonally adjacent on a lower terrace by moving onto it. The attacked piece must not be bigger than the capturing piece, and may be the same color.

There are two ways to win:

  1. Move your T piece to the lowest space opposite your starting side. I.e., Orange and Blue try to move their Ts onto the space in the upper right corner, while Green and Purple try to get their Ts to the lower left corner.
  2. Capture your opponent's T. In a three or four player game, capturing a player's T eliminates that player from the game, and everyone else continues playing. So capturing an opponent's T is not an immediate win unless that is your only (remaining) opponent.

JavaTerrace Instructions

Basic Play

When the JavaTerrace program runs, it automatically starts a new game of Terrace set up in the default configuration, which is a 2 player long game on an 8x8 board. If you want to play in a different configuration, choose the desired options from the popup menus. The first menu sets the number of players, which can be 2, 3, or 4. The second menu indicates whether a long, medium, or short game is desired. This option only applies to 2 player games, and thus can only be set when the number of players is set to 2. The third menu sets the board size, allowing you to play on either an 8x8 or 6x6 board.

The "PBeM Config." checkbox makes JavaTerrace behave more like Terrace on Richard's PBeM Server. This is useful if you are using JavaTerrace as a companion to an email Terrace game using "Setup Mode" (see info on Setup Mode below). Terrace on Richard's server has some slight differences from the standard Terrace configurations. For example, for 3 player games the board is set up with pieces of all four colors; one set of pieces simply isn't used by any of the players. Also, the play order for games with 3 or 4 players is counterclockwise instead of clockwise (except for a 4 player game on a 6x6 board, which has a strange play order). Checking the "PBeM Config." checkbox will ensure that the initial setup and turn sequence for your game will mimic what you would get on Richard's server.

After you have selected the desired options, Click the "New Game" button. This will set up the board and start a new game. Make moves by clicking and dragging the pieces to their desired locations. JavaTerrace will only allow legal moves to be made, so if a piece doesn't want to stay where you're trying to put it, review the Terrace Rules section to make sure that you're making a legal move. Also make sure that you are moving a piece of the correct color. The message box at the bottom of the applet will always indicate whose turn it currently is.

When a player has won, JavaTerrace will announce this in the message box.

If you make a move and then regret it, you can take it back by clicking the "Undo" button. JavaTerrace allows unlimited undos, so you can undo as many moves as you want, until the game is set back to its initial position.

Setup Mode

Version 2.2 of JavaTerrace introduced "Setup Mode". This is a feature that allows you to set up a Terrace board any way you want, and then try out different moves from that position. To use Setup Mode:

  1. Check the "Setup Mode" checkbox. This will effectively disable JavaTerrace's restriction of illegal moves. The message box will indicate that any piece can be moved, regardless of color.
  2. Setup the board to the desired configuration. Move the pieces to wherever you want them. To remove a piece from the board, simply drop another piece onto it, just like a capture.
  3. Uncheck the "Setup Mode" checkbox. This will reactivate the illegal move restriction. The message box will still indicate that a piece of any color can be moved, because JavaTerrace doesn't know whose move it should be. However, the first move you make after unchecking the "Setup Mode" checkbox will set the current color, and JavaTerrace will subsequently keep track of colors properly.

The other thing that happens when you exit Setup Mode is the initial undo point gets set to the current board configuration. In other words, you can only undo moves that have been made after exiting Setup Mode.

The purpose of Setup Mode is so that you can use any board configuration as the starting point of a Terrace game. This is useful for solving Terrace problems, or as an aid for playing Terrace by correspondence. This makes it a useful tool if you play Terrace using Richard's PBeM Server*. For example, you receive your opponent's latest move in the mail. You have some ideas about what you want your next move to be, but you want to try them out on an actual board before deciding on the best approach. So you run JavaTerrace, start a new game (don't forget to make sure the "PBeM Config." checkbox is checked before clicking the "New Game" button!), enter Setup Mode, configure the board to match the current position in the game you're playing, and then exit Setup Mode. Now you can try different moves and different responses from your opponent, and you can always undo back to the initial position.

You could also use Setup Mode to play homemade Terrace variants that use non-standard initial positions. Or you could leave Setup Mode turned on and play homemade Terrace variants that allow moves that are normally illegal.

*Note that as of version 3.1, an easier way to use JavaTerrace as a companion to Richard's PBeM Server is to run it as an application and use the "Import PBeM File..." command.


Version History


Related Links


This document was last modified on March 13, 2007
Please send all comments to karlvonl@rcn.com