Giter Site home page Giter Site logo

navalbattle's Introduction

NavalBattle

A graphical solo vs AI battleship game made in Java and using JavaFX.

Install

The project uses maven 2. You can build using mvn install.

Getting started

Maven should have built a runnable jar file in the target folder. Simply double click it to run or use java -jar file.jar.

The board will appear. Your boats and the enemy's ones are placed randomly.

Fresh start screenshot

Your board is on the left. The enemy's one is on the right.
You're first to play. In order to fire, click the tile you want in your enemy's grid. If a red square appears, you hit a ship. However if a red cross appears, it means that you fired in the water.

Once your turn is finished, the AI will play. Its actions are represented the same way on your grid.

Some turns later screenshot

Destroy all the enemy's ships before it manages to destroy all yours!
Once the game is over, the enemy's grid is revealed.

Game ended screenshot

You can start a new game at any time by pressing the "Play again" button in the bottom right corner of the window. Have fun!

navalbattle's People

Contributors

system-glitch avatar

Watchers

 avatar  avatar  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.