https://github.com/kennethlove/hangry-games
https://github.com/kennethlove/hangry-games
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/kennethlove/hangry-games
- Owner: kennethlove
- License: apache-2.0
- Created: 2024-07-23T21:53:59.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-12-16T16:40:38.000Z (6 months ago)
- Last Synced: 2025-03-17T12:14:19.695Z (3 months ago)
- Language: Rust
- Size: 480 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hangry-games
## Description
A Hunger Games simulator.
## Setup
Hangry Games requires Rust to be installed. You can install Rust by following the instructions at
[https://www.rust-lang.org/tools/install](https://www.rust-lang.org/tools/install).Hangry Games also requires a PostgreSQL database to be running. It expects to connect on `localhost:5432` with username
and password `diesel`, and a database named `hangry_games`.Once your dependencies are installed you should be able to `cargo build` with no issues.
If everything builds, install `dioxus-cli` and `diesel_cli` : `cargo install --locked dioxus-cli diesel_cli`.
Then run `diesel setup` to set up the database and `diesel migration run` to apply the migrations, if they weren't already.
Finally, you should be ready to run the application: `dx serve -- --bin hangry`.
## Running a game
1. `cargo run -- add-game`
this will give you a game name, copy that.
2. `cargo run -- fill-tributes `
this will fill the game with tributes.
3. `cargo run -- start-game `
this will start the game by placing all tributes in the arena.You can skip these first three steps by using `cargo run -- quick-start`.
4. `cargo run -- run-next-day `
this will run a new day of the simulation.