A wasm-based version of the abstract board-game Yinsh, written in Rust using the macroquad library. The open source code is available on github.
How to play
Taken from Wikipedia
The goal of the game is to remove three of one's own rings from the game. Since this is the goal of the game, getting closer to winning necessitates weakening oneself, which considerably complicates strategy as a move which brings one closer to winning the game may end up being a very poor move.
The game starts with an empty board, and proceeds in two phases, placement followed by movement.
Placement
During the first phase the players, take turns placing one of their rings on the board on any unoccupied space, beginning with white. Once both players each have placed all five of their rings, this phase is over.Movement
The second phase involves forming lines, defined as five adjacent markers in a straight line with a single color. Once a line is formed in one player's color (on either player's turn), that player removes the five markers, and also one of their rings. Once a player has removed three of their rings, they win the game.A turn consists of the following:
- The player chooses one of their own rings to move.
- The player places a marker, with their own color face-up, in the middle of that ring on the space it occupies.
- The player then moves the ring to another unoccupied space, along a straight line from the originating node. The marker never moves. In general, there are six directions from any node, with exceptions along the perimeter of the game board.
When moving a ring, the following rules apply:
- The moving ring may not move over other rings.
- The moving ring may pass over any number of markers in a row. If it does so, it must stop on the blank space immediately following the last marker moved over. All markers moved over like this are flipped over after moving the ring, reversing their color.
- A moving ring may not end on a space already occupied by a marker.