This project was generated with Angular CLI version 14.2.6.
Game of Tribes follows the rules of John Conway's Game of Life:
- If a cell is dead
- It comes alive it has 3 live neighbors, due to reproduction
- Else, it remains dead
- If a cell is alive
- It stays alive if it has 2 or 3 live neighbors
- It dies if it has 1 live neighbor, due to underpopulation
- It dies if it has 4 or more live neighbors, due to overpopulation
- Each cell (unless on the edge of the graph) has 8 neighbors, including diagonals
The above rules hold true in Game of Tribes. However, a live cell can belong to one of two tribes (yellow or blue).
Additional rules are as follows:
- A dead cell comes alive if it has 3 live neighbors with the tribe of the majority of its neighbors
- A live cell dies if doesn't have exactly 2 or 3 live neighbors
- A live cell remains the same tribe if it has two live neighbors of differing tribes
- A live cell with two live neighbors of the same tribe will belong to that tribe regardless of its current tribe
- A live cell with three live neighbors will belong to the tribe of the majority of its neighbors
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The application will automatically reload if you change any of the source files.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory.
Run ng test
to execute the unit tests via Karma.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI Overview and Command Reference page.