A simple SOS game built using Yew and Rust.
I used to play this game with my friends or family when I was a kid.
I built this to be nostalgic and to remind me of my childhood.
Despite it is not as much fun as playing using paper and pen with a loved one, but you know...
This project demonstrates the power of Rust for building frontend applications with interactive game logic.
- Install Rust: Get Started with Rust
- Install Trunk (for serving the Yew application):
cargo install trunk
- Clone this repository:
git clone <repo-url> cd sos-game
- Serve the project using Trunk:
trunk serve
- Open the application in your browser at http://localhost:8000.
sos-game/
├── Cargo.lock # Dependency lockfile
├── Cargo.toml # Rust project configuration
├── index.html # Main HTML file
├── Trunk.toml # Trunk configuration
├── assets/ # Static assets
│ └── main.css # Main CSS file
└── src/ # Source code
├── main.rs # Main Rust entry point
├── components/ # Frontend components
│ ├── board.rs
│ ├── cell.rs
│ ├── constants.rs
│ └── state.rs
└── engine/ # Game logic
├── bot.rs
├── cell.rs
└── game.rs
To modify the size of the game board:
- Open
src/main.rs. - Update the
colandrowvariables to your desired dimensions.
- Rust - Programming language
- Yew - Rust framework for building front-end web apps
- Trunk - Build and bundling tool for Rust web apps
