Skip to content

An interactive AI vs human battleship game coded in Java + JavaFX for GUI design

Notifications You must be signed in to change notification settings

angel-gao/AI-VS-Human-Battleship

Repository files navigation

AI VS Human Battleship Game

Game Playground Images

Image 1 Image 2

Image 3 Image 4

Introduction

AI VS Human Battleship Game AI vs. Human Battleship is an interactive game developed using Java and JavaFX, offering a graphical user interface for engaging battleship gameplay. Players can challenge an artificial intelligence in a classic battle of naval strategy. For the rules to play the game, please reference to this pdf

Features

  • Designed a graphical user interface with JavaFX that supports basic gaming functionalities like text display, difficulty selection, instructions page, sound effects, background music, and saving and loading gaming features
  • Boosted the AI’s winning rate against human users to about 60% by applying the concept of a probability density function

File Descriptions

  • src\java\main_files contains all java files utilized the OOP framework which establish aa comprehensive class hierarchy for integrating both coding logic and game interface development components
  • src\java\resources contains all images, .fxml and css files for GUI
  • target folder saved the pre-compiled java files in .class format

Usage

It would be a bit difficult to setup the game in local machine as I used the IntelliJ build-in module environment setup to install javaFX model and setting src\java\main_files\Battleship.java as main file. One could see the sample playing video by downloading .mov in Gaming Folder

About

An interactive AI vs human battleship game coded in Java + JavaFX for GUI design

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published