Giter VIP home page Giter VIP logo

battleship-game-project's Introduction

Battleship Game

Introduction

Welcome to the Battleship Game written in Java. This classic game allows you to engage in strategic naval warfare against an opponent by trying to sink their fleet of ships while protecting your own.

Features

  • A graphical user interface built with JavaFX for an immersive gaming experience.
  • Single-player mode against an AI opponent.
  • A user-friendly interface with a grid to track your shots and the opponent's fleet.
  • Leaderboard on startscreen with best performances

Prerequisites

To run the Battleship Game, you need the following:

  • Java Development Kit (JDK) 11 or higher installed on your system.
  • JavaFX SDK 11 or higher installed and properly configured.

How to Play

ย  If there is any problems with finding filepaths, press CTRL+SHIFT+P and type >Java: Clean Language Server Workspace

  • Press run over the main-method in battleshipApp.java to start the game
  • Login with a username and press PLAY
  • The game board consists of two grids: one for your fleet and one for your opponent's fleet.
  • Click on cells in your own board to place ships - you have 5 ships to place (use ALT+Click to get horizontal ships)
  • Click on the cells in your opponent's grid to take shots and try to sink their ships.
  • Your fleet is on the left side, and your opponent's fleet is on the right side.
  • The game ends when all of your opponent's ships are sunk or when your fleet is destroyed.
  • You can view the leaderboard by clicking on the Leaderboard button on the startscreen.

License

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

Acknowledgments

  • Inspired by the classic Battleship board game.

Have fun playing Battleship!

battleship-game-project's People

Contributors

mortenlyn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.