Skip to content

Project for the Integration of Information Systems course

Notifications You must be signed in to change notification settings

feczkob/battleship

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

battleship

Project for the Integration of Information Systems course

The game

Battleship (also Battleships or Sea Battle) is a strategy type guessing game for two players. It is played on ruled grids (paper or board) on which each player's fleet of ships (including battleships) are marked. The locations of the fleets are concealed from the other player. Players alternate turns calling "shots" at the other player's ships, and the objective of the game is to destroy the opposing player's fleet.

When the game starts the player is given an initial state of their ships:

  • 2 sized: 4 pcs
  • 3 sized: 3 pcs
  • 4 sized: 2 pcs
  • 5 sized: 1 pcs

They can ask for new positions via a call to the corresponding API endpoint.

Features

  1. Create new user if it does not exist
  2. Find user by Id
  3. Get all users
  4. Change username
  5. Create room: other player can join for a multiplayer game or the owner can leave
  6. Get all rooms
  7. Start a single player game vs. a naive robot
  8. Start a multiplayer game vs. a real user
  9. Shoot at a specific field
  10. Get leaderboard

Commands related to the app

To run the app:

  1. Start the MySQL docker container from the IDE or from CLI.
  2. mvn spring-boot:run in the battleship folder.

To enter the MySQL container: docker exec -it database mysql -uroot -ppassword in the battleship folder.
mysql> use battleship;
mysql> select * from room; or mysql> select * from user;
For other possible commands click here.

To run the app in docker container:

  1. Create image: docker build -f src/main/resources/docker/Dockerfile -t <image_name>:<tag> ./ in the battleship folder after a mvn clean install.
  2. Edit the docker-compose.yml file, enter the image name and tag in the 25th line.
  3. docker-compose up in the \battleship\src\main\resources\docker folder.

Useful links

Battleship
Docker for Windows
If Docker Engine does not start, try this.
MySQL in Docker
The repository for the frontend app can be found here.

About

Project for the Integration of Information Systems course

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages