Files in the top-level directory in any check-in
Order and Chaos
Order and Chaos is a two-player, complete information board game with a unique property: players can play any type of piece!
The playing board is a 6x6 array. Players alternate turns placing either a red or blue piece on any open square. To emphasis the point, a player can place a piece of either color on their turn. The first player - Order - wins by creating a vertical, horizontal or diagonal line of pieces of either color. The second player - Chaos - wins by preventing that. My suspicion - never having played a game - is that Order has an easier task, but we'll see.
This program was written to help me learn Rust. As such, you need a
rust compiler and the rust project manager (cargo) installed. This
uses the release 1.8.0 compiler, and should compile on more recent
releases. Just use
cargo build release in the top level directory to
It is primarily a library, but there are three applications it will build:
- gtk - the main program with a GUI built in GTK.
- cli - a command line version for testing. Use
- bench - a benchmark program, as the benchmark features were not available in the release version at the time it was written.
The settings of interest are which players, if any, the human will play and a difficulty setting.
You can select to play Order or Chaos. Or both of them to for a "pass and play" type game, or neither to see what the computer does against itself.
The current difficulty setting goes from 1 to 32. 1 will not even block potential winning moves. 32 will solve the game - if you give it time. Values of 4 to 6 give reasonable "thinking" times and play, though it still doesn't play very well. That should be improved in the future, but the game is not without interest.
The AI will currently resign as soon as the other player has a forced win. I haven't decided if I want to change this or not.