Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marmelab/pentago-symfony
https://github.com/marmelab/pentago-symfony
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/marmelab/pentago-symfony
- Owner: marmelab
- License: mit
- Created: 2021-02-01T07:24:23.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-24T16:20:35.000Z (over 3 years ago)
- Last Synced: 2024-11-08T01:37:03.121Z (6 days ago)
- Language: PHP
- Size: 3.65 MB
- Stars: 1
- Watchers: 10
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# pentago-symfony
[Pentago](https://en.wikipedia.org/wiki/Pentago) game implementation in **Symfony 5**.
Definition and rules from Wikipedia :
> Pentago is a two-player abstract strategy game invented by Tomas Flodén. The Swedish company Mindtwister has the rights of developing and commercializing the product. The game is played on a 6×6 board divided into four 3×3 sub-boards (or quadrants). Taking turns, the two players place a marble of their color (either black or white) onto an unoccupied space on the board, and then rotate one of the sub-boards by 90 degrees either clockwise or anti-clockwise. A player wins by getting five of their marbles in a vertical, horizontal or diagonal row (either before or after the sub-board rotation in their move). If all 36 spaces on the board are occupied without a row of five being formed then the game is a draw."
## Prerequisite
- [Docker](https://www.docker.com/) & [docker-compose](https://docs.docker.com/compose/) are installed on your machine.
## Installation
- Clone this repo
- Run `make install` to install dependencies. It will also create a `.env.local` file.
- Fill `.env.local` file with your credentials.
- Run `make start` to start the server
- Run `make create-db` to create & initialize the database
- Run `make migrate` to run migrations
- Play on [localhost:8080](http://localhost:8080)
> Type `make help` to list all commands available## Database persistance
We are using a postgres image to run locally our database.
You can access to Adminer on [localhost:8081](http://localhost:8081) and entering credentials from the `.env.local` file.> Do not using .env to store your personal credentials because it's git tracked.
### Migrations
- `make create-migration` for creating a doctrine migration if entities has been changed.
- `make migrate` to run pending migrations.