sopra-fs24-group-03 / sopra-fs24-group-03-server

GNU General Public License v3.0
0 stars 0 forks source link

SoPra Group 3 Project: Poker

Introduction

Welcome to our project; A free, user-friendly online poker game. This game allows friends to connect, compete, and enjoy poker without the distractions and limitations of other online alternatives.

Our whole team is a big fan of the game of poker. Therefore, it was clear we wanted to create a poker game. But what would make our poker game special? We wanted to create a game where friends could play poker together, whenever and wherever they are. Despite the plethora of online options, finding a satisfactory platform to play poker with friends can be difficult. Most online poker games are cluttered with ads, require in-app purchases, or are just not user friendly.

By eliminating ads and unnecessary costs, we ensure that our platform is accessible to everyone, making it easy to start a game of poker and practice some new strategies or just have fun with your friends.

The Poker variation we implemented is Texas hold'em; the rules can be read here, any implementation-specific alterations are documented on the frontpage of our website.

Technologies used:

The Server has been written in Java using the following technologies:

High-Level Components

UserService

The UserService class handles requests related to user management, including:

The User entity is persisted using the JPA database.

LobbyService

The LobbyService class manages requests associated with lobby operations, such as:

Note that when a game is started, it is initialized not with the User entity directly, but with Player entities, where the relevant information is copied over from the user entity.

The Lobby is also saved as an entity inside the JPA database.

GameService

The GameService class handles the core game logic, including:

When a game is finished, the game updates the user entities with the new values. After that, it waits for 10 seconds and deletes the Game, Player, and GameTable entities from the JPA.

The information relevant to the game is saved inside three separate entities in the JPA:

All of these are persisted in the JPA.

Launch & Deployment

To launch and deploy the server, follow these steps:

  1. Install Dependencies: Dependencies are managed using Gradle. It is however not required to have Gradle installed on your system. To install dependencies with the Gradle wrapper, run the following command:

    ./gradlew build
  2. Run the Server Locally: To run the server locally, execute the following command:

    ./gradlew bootRun
  3. Testing: To run tests, use the following command:

    ./gradlew test
  4. Deployment to Google Cloud with GitHub Actions: The server is deployed to Google Cloud using GitHub Actions. Ensure your GitHub repository is set up with appropriate GitHub Actions workflows for deployment. Push your changes to the repository, and the deployment workflow will automatically build and deploy the server to Google Cloud.

Roadmap

Following are some feature ideas that could be implemented:

Authors and Acknowledgements

Authors

Acknowledgements

We would like to acknowledge the following for their contributions and support:

Special thanks to:

License

This project is licensed under the GNU General Public License - see the LICENSE file for details