Skip to content

aodihis/sos-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SOS Game

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.

SOS Game Demo


🚀 Getting Started

Prerequisites

  • Install Rust: Get Started with Rust
  • Install Trunk (for serving the Yew application):
    cargo install trunk

Run the Project

  1. Clone this repository:
    git clone <repo-url>
    cd sos-game
  2. Serve the project using Trunk:
    trunk serve
  3. Open the application in your browser at http://localhost:8000.

📂 Project Structure

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

⚙️ Customization

To modify the size of the game board:

  1. Open src/main.rs.
  2. Update the col and row variables to your desired dimensions.

🛠️ Built With

  • Rust - Programming language
  • Yew - Rust framework for building front-end web apps
  • Trunk - Build and bundling tool for Rust web apps

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published