Download
To download Stratego version 2.1, simply type the following command into a computer.
pastebin get YHSUmz42 stratego
Requirements
- ComputerCraft version 1.74 or later
- Two computers. Supported types including normal, pocket, and turtle, along with standard and advance computers. The two computers do not have to be the same type
- A modem to connect the two computers, either wireless or wired works
To start the game, simply run the game with a first parameter of either "host" or "join", and a second parameter of the game name. If you are the host, you can provide an additional optional parameter between the first and second to load a save file. That save file will either contain pieces, or options for setup. If a file is loaded and it has pieces, the pieces and turn are loaded from that file, otherwise both players will be given the option to setup their pieces.
When setting up, simply click a space in the first three rows on your side, then type the piece to place there (it will write in the log how many pieces you have remaining of each type and total). You can also click a piece you already places to swap it for a different piece. Some pieces support alternate names, such as you can additionally use "!" for the 10, "F" for the flag, "B" or "*" for a bomb, and "1" for the spotter. If you want to remove a piece you placed, simply click it and send a blank string, and it will be removed. Once you finish, simply press the + button or type "done" into the console.
Using custom options, it is possible to change the locations of the lakes, the total amount of pieces, the total pieces to place, the required amount of flags, the amount of rows players can place pieces in, and even whether you play on the long or short side of the board. For a full list of available options and defaults, see here.
Once both teams are setup, the game will begin with red going first (or white on a standard computer). Red team will always be the host.
Rules
On your turn, you may move up to one of your pieces one space in any direction, simply by clicking it then clicking the destination. If you decide you don't want to move a piece after clicking, simply click it again and it will deselect. Pieces cannot move onto lakes or pieces on the same team, and if they move onto a space with an opponent's piece, the two will battle. In battles, the piece with the higher rank will win, defeating the other piece. If the two pieces have equal ranks, they both will die.
Some pieces have special abilities:
- The flag cannot move and has a rank of -1. If your flag is captured, you lose the game
- Bombs also cannot move, but they defeat nearly every other piece, having a rank of 11
- Spies have a rank of 0, but can defeat the 10 if they are the attacker
- 3's can defuse bombs, rather than being defeated like all other pieces
- 2's can move as many spaces as wanted in one direction, though they cannot move over lakes or other pieces
- The spotter has a rank of 1, but he has a special "spot" ability. If there is a piece in front of him either before or after his move (but not after a battle), you will be prompted to call the piece in front of him. If you are correct, the piece is defeated, no matter what its rank. If you fail, nothing happens, save your spotter's location being revealed. If you don't want to use this ability even though a piece is in front of the spotter, simply send a blank string as the call.
Notes
- If you are using a standard computer, you will be prompted to type in coordinates rather than be able to click the spaces
- At the beginning of your turn, you may click the "+" button (or type either "menu" or "button" on a standard computer), and it will bring up the menu. If you type "quit", the game will quit. If you type "forfeit", you will lose the game (in case you run out of moves). If the string is blank, it will return you to the previous dialog. If you are the host, you have an additional option of "save" to save the game to a file then return to playing, or will be prompted to save the game if either you or the guest choose to quit.
- I have not extensively tested this game, so there may still be bugs, hence the game being in a Beta stage. Please report any bugs you find to this thread, along with detailed steps to reproduce it.
- This game does prevent some hacking, but it still may be easy to work around, as it is designed to be a fun game to play with friends.
- The game supports configuration using a file named "stratego.cfg", which must be located in the directory you boot the game from (if anyone know a good way to check for the file in the same directory as the game instead, please let me know). Inside this file you can change the colors used by the game, the locations of elements and borders, names of teams and pieces, and a default file to load upon startup. For a full list of configuration options, see here.
More screenshots
Waiting for a friend
Placing pieces using a custom options set
Placing pieces in the normal options
More gameplay
Gameplay with custom options
Supports turtles
And standard computers
Victory
Prompt after a game ends on a save game
Thanks for playing
Custom colors