feat: Implement SQLite backend and configuration UI

This commit is contained in:
Keith Solomon
2025-08-15 07:08:26 -05:00
parent 23e98e3696
commit b9cb61750d
8 changed files with 199 additions and 29 deletions

View File

@@ -10,22 +10,30 @@ Each turn, you roll the dice to see what happens in the city. The events will af
You can also try to assassinate the emperor. This is a risky move, but if you succeed, you win the game (though you die a martyr).
## Configuration
This project uses a SQLite database to store game data and configuration.
You can modify the game's configuration by clicking on the "Configuration" button on the main page. This will take you to a page where you can edit the score thresholds, win conditions, and event descriptions.
## Technical Details
This project is built using:
* **Frontend:** HTML, CSS, JavaScript
* **Backend:** PHP
* **Database:** SQLite
## How to Run Locally
To run this project locally, you need a PHP server. You can use a local development environment like XAMPP or MAMP, or you can use the built-in PHP server.
To run this project locally, you need a PHP server with the `pdo_sqlite` extension enabled. You can use a local development environment like XAMPP or MAMP, or you can use the built-in PHP server.
1. Clone this repository.
2. Start a PHP server in the project directory. For example, you can run the following command:
2. Make sure the `pdo_sqlite` extension is enabled in your `php.ini` file.
3. Start a PHP server in the project directory. For example, you can run the following command:
```bash
php -S localhost:8000
```
3. Open your web browser and go to `http://localhost:8000`.
4. Open your web browser and go to `http://localhost:8000`.