A two-player cellular automaton strategy game built with Rust and eframe (egui).
NESW4 is a competitive game where two players fight to dominate the grid by strategically choosing rules. Each player controls cells that spread based on neighbor patterns.
-
Grid: A 64x64 toroidal (wrapping) grid
-
Cell States:
- Neutral (gray)
- Player 1 (blue)
- Player 2 (red)
-
Rule System: Each rule defines a pattern of 4 neighbors (top, right, bottom, left). When a cell's neighbors match a player's rule, that cell becomes theirs.
- Starting Rule Selection: Both players take turns selecting their initial rules.
- Rounds (repeat):
- Battle Phase: The grid evolves for 128 iterations based on player rules. The player with the most cells at the end wins the round.
- Shop Phase: The loser of the battle shops first, then the winner. Players earn money and can buy new rules, delete a rule from a player or upgrade spawn probability.
cargo run --releaseHave fun dominating the grid!