8000 GitHub - sopra-fs24-group-26/server: A webversion of the board game "Saboteur"
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

sopra-fs24-group-26/server

Repository files navigation

Saboteur Web Version

A webversion of the board game Saboteur, project for the Software Engineering Lab FS24 at UZH.
Our focus was to implement something that would exite us, leading to the creation of a simple web version of a fun board game we had played together

Official game rules: https://world-of-board-games.com.sg/docs/Saboteur-Amigo.pdf

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Make sure you have the following installed:

Installing

  1. Clone the repository
  2. Navigate to project directory and build the server: ./gradlew build
  3. Run the server locally: ./gradlew bootrun

Running the tests

The test suite mainly consists of three parts: ControllerTest, RepositoryIntegrationTest and ServiceTests.

The ControllerTest is responsible to test REST endpoints, ServiceTest contains unit tests on backend services (updating and fetching data in database), while RepositoryIntegrationTest asserts interaction with database behaves as expected.

To run the test, use the gradle task bar, click on "Task" -> "verification" -> "test" to run the test suite. A JaCoCo test report will be generated automatically.

Deployment

To deploy the Saboteur Web Version on a live system, we use GitHub Actions to automate the deployment process to a Google Cloud server. However, you are free to choose any deployment method or cloud service that suits your needs. Below is a brief outline of our deployment process:

  • Google Cloud Server: Our application is hosted on a Google Cloud server, providing reliable and scalable infrastructure for running the game.
  • GitHub Actions Setup: We use GitHub Actions for continuous integration and deployment. This ensures that our application is automatically tested and deployed whenever changes are pushed to the repository.

Feel free to adapt the deployment process to your preferred environment or cloud provider.

Technologies used

Server

  • Spring Boot - Framework for building Java-based web applications
  • Gradle - Build automation
  • JUnit - Testing framework for Java
  • SonarQube - Code quality and security analysis tool
  • JaCoCo - Java Code Coverage Library

Client

  • npm - Package manager
  • React - JavaScript library for building user interfaces
  • Phaser - The Game Framework used
  • DiceBear - Avatar library

High-level components

Our project consists of three main high-level components: Controller, Service and Repository.

Controller

The Controller is takes care of REST endpoints. Valid requests and expected behavior of each request to server is defined here. This layer has direct dependency with the Service layer.

Service

The Service component handles actions called by Controller and interaction with database. There are three classes associated with this layer: PlayerService, SessionService and TileService that each operate with the corresponding type of entity. The Service layer communicates directly with the database/ Repository layer.

Repository

The Repository layer represents the database. We use the Spring framework's JPARepository library for persistence.

General remarks

In our project, the server only keeps track of the crucial information regarding a session/ game. It receives update request from client, updates the information in database, but doesn't actively send data to client. The client fetches game state in a constant time interval via the ping request.

Roadmap - Ideas for future implementations

  • Add more Actions to the game
  • Make personalizable Avatar creation
  • Add a timer to a players turn
  • Add chat to game
  • Add animations/more particles
  • Add sound effects and music

Pattern

Issue: "Userstory: Issue Summary"
Branch: "Issuenumber-issue-description"
Commit: "Issuenumber: Commit message"
PR: "Userstory: PR/Issue description"

Workflow

  1. Create Userstories
  2. Create architecture through in person meeting.
  3. Create issues based on userstories, connecting them in development tasks.
  4. Assign issues to members.
  5. Members create branches and commit changes.
  6. Members open pull requests which the others review.
  7. When merged, issue gets closed.

Formatting

  • Generally good structuring in folders (for example for all DTOs)
  • Generally small functions and classes
  • For TS: Prettier formatting
  • For Java: still to find out

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments

We thank the team of the Sopra FS24 modul for giving us the opportunity to freely work on a project.

About

A webversion of the board game "Saboteur"

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

Languages

0