An open API service indexing awesome lists of open source software.

https://github.com/fight-fire-with-scala/scala-fire-tower

PPS Project A.Y. 2023/24
https://github.com/fight-fire-with-scala/scala-fire-tower

board-game dsl mvc prolog scala turn-based

Last synced: 3 months ago
JSON representation

PPS Project A.Y. 2023/24

Awesome Lists containing this project

README

        

= Scala Fire Tower

ifdef::env-github[]
:note-caption: :information_source:
:tip-caption: :bulb:
:warning-caption: :warning:
endif::[]

image:https://github.com/Fight-Fire-With-Scala/Scala-Fire-Tower/actions/workflows/test-main.yml/badge.svg[Test] image:https://github.com/Fight-Fire-With-Scala/Scala-Fire-Tower/actions/workflows/tagged-release.yml/badge.svg[Release]

Scala Fire Tower is a competitive board game where players manage fire watchtowers, attempting to protect their tower from spreading forest fires while directing the flames toward their opponents' towers. Players utilize resources like firefighters, water, and firebreaks to control the fire's spread. The fire's direction is influenced by the wind, and players can change the wind direction using action cards. The goal is to eliminate opponents by burning down their towers. The game can be played by 1-2 players and typically lasts 15 minutes.

== Compilation

To run the application:

[source, sh]
----
sbt run
----

To run the tests:

[source, sh]
----
sbt test
----

To generate the coverage report:

[source, sh]
----
sbt test coverage coverageReport
----

To build the FAT Jar:

[source, sh]
----
sbt assembly
----

To run the application from the generated Jar:

[source, sh]
----
java -jar target/scala-3.4.2/scala-fire-tower.jar
----

[TIP]
====
If the build fails due to classes not found, try to run `sbt clean` to rebuild the application from scratch.
====

== Quickstart

* *Starting the Game*
** Select the gamemode, Human vs Human or Human vs Bot.
** Player 1 has the towers (15,0), (0,15), while player 2 has towers (0,0) and (15,15).
** Each player is dealt 5 cards, plus a special bucket card.
** The wind's starting direction is determined randomly.
* *Objective*
** Burn down the opposing towers by spreading fire and defend your own. The last player with an intact tower wins.
* *Turn Structure*
** _Spread Fire_: at the start of each turn, players must spread the fire in the current wind direction.
** _Play Action Cards_: players can play one action card to manipulate the wind, spread fire, or use water or firebreaks to protect their tower.
** _Redraw a Card_: after playing a card, draw one new card from the action deck.
* *Action Cards*
** _Fire Cards_: spread the fire in specific patterns.
** _Wind Cards_: change the wind direction.
** _Water Cards_: extinguish fire gems in specific areas.
** _Firebreak Cards_: place barriers to prevent the fire from spreading.
* *Defending the Tower*
** Each player’s tower has a designated area. Use water cards or firebreaks to prevent fire from entering this area.
** Once fire enters your tower, you are eliminated from the game.
* *Winning the Game*
** The game ends when a player loses its first tower. The other player wins the game.