No description
  • Java 97.8%
  • Gherkin 2.2%
Find a file
2025-10-16 15:16:04 +02:00
.devcontainer devcontainer 2024-04-23 14:15:21 +02:00
.forgejo/workflows Add Forgejo CI 2025-10-16 15:16:04 +02:00
.github devcontainer 2024-04-23 14:15:21 +02:00
console-app Update dependencies 2024-03-05 10:40:28 +01:00
game-controller Update Docker, Gradle and depdencies to latest versions 2020-06-30 16:30:06 +02:00
gradle/wrapper Update README and Gradle to JDK 23 2025-06-25 14:33:16 +02:00
.gitignore Add .vcsode/ directory to .gitignore 2020-07-01 09:31:54 +02:00
.gitlab-ci.yml Add build and jacocoTestReport to sonar task 2024-06-13 12:47:31 +02:00
build.gradle Add Forgejo CI 2025-10-16 15:16:04 +02:00
buildpipeline-maven.yml Copy .jar to artifacts directory as Maven isn't creating a ZIP yet 2022-09-22 17:45:11 +02:00
buildpipeline.yml Update buildpipeline.yml 2021-11-12 16:32:56 +01:00
gradlew Update Docker, Gradle and depdencies to latest versions 2020-06-30 16:30:06 +02:00
gradlew.bat Update Docker, Gradle and depdencies to latest versions 2020-06-30 16:30:06 +02:00
pom.xml Update dependencies 2024-03-05 10:40:28 +01:00
README.md Update README and Gradle to JDK 23 2025-06-25 14:33:16 +02:00
settings.gradle Initial commit 2018-11-14 09:49:42 +01:00

Build status

Battleship Java

A simple game of Battleship, written in Java. The purpose of this repository is to serve as an entry point into coding exercises and it was especially created for scrum.orgs Applying Professional Scrum for Software Development course (www.scrum.org/apssd). The code in this repository is unfinished by design.

Getting started

This project requires a Java JDK 8 or higher. To prepare to work with it, pick one of these options:

Run locally

Run battleship with Gradle

./gradlew run --console plain

Execute tests with Gradle

./gradlew test

Docker

If you don't want to install anything Java-related on your system, you can run the game inside Docker instead.

Run a Docker Container from the Image

docker run -it -v ${PWD}:/battleship -w /battleship openjdk:23 bash

This will run a Docker container with your battleship case study mounted into it. The container will run in interactive mode and you can execute Gradle commands from the shell (see examples below).

If you are using Docker for Windows you might run into issues and get a message like

env: ‘sh\r’: No such file or directory

The reason for this is that Windows uses CRLF while Linux (in the Docker Container) uses only CR You can solve the issue by cloning the repository with a specific parameter:

git clone https://github.com/proscrumdev/battleship-java.git  --config core.autocrlf=input

Launching the game

./gradlew run --console plain

Running the Tests

./gradlew test