Skip to content

A simple simulation of battleship game written in Java language using Swing library.

Notifications You must be signed in to change notification settings

EmilijaSvirsk/Battleship

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 

Repository files navigation

Battleship

A simple simulation of battleship game written in Java language using Swing library.

The program scans ships.txt file for the user's ship layout and generates a random layout for computer. The user can take a shot by pushing a button and will be informed whether the shot missed, hit or destroyed a ship. The computer randomly chooses places to shoot. The first one to destroy all ships wins.

The project was created to learn object oriented programming for university course and will not be updated. The code has specific inclusions according to the given tasks:

  • Polimorphism
  • Abstract class
  • Interface
  • Exceptions
  • Collections
  • Enhanced for loops and iterators
  • Lambda functions
  • Java design patterns (Singleton, Mediator Pattern)
  • Threads, volatile variables, synchronization, monitors