alexphanna / battleship

Battleship in Java Swing. Made for AP Computer Science A in junior year of high school.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Battleship

Made for AP Computer Science A

Ship placing screen

Torpedo targeting and firing screen

Current status of the player's ship class

Features

  • Abstract ship object class w/ instance variables for size
  • Inherited children for ship types (Carrier, Battleship, Cruiser, Submarine, Destroyer)
  • 10 by 10 2D primitive integer arrays to represent ship positions
  • A grid class that extends a JPanel w/ a GridLayout that displays the 2D arrays
  • Fully functional interface w/ draggable ships and accurate displaying of the 2D arrays
  • Singleplayer mode with computer that takes random shots to play against
  • Multiplayer mode that can connect via LAN and use a simple universal language to communicate w/ other Battleship clients

About

Battleship in Java Swing. Made for AP Computer Science A in junior year of high school.


Languages

Language:Java 100.0%