https://github.com/alexphanna/battleship
Battleship in Java Swing. Made for AP Computer Science A in junior year of high school.
https://github.com/alexphanna/battleship
battleship
Last synced: 13 days ago
JSON representation
Battleship in Java Swing. Made for AP Computer Science A in junior year of high school.
- Host: GitHub
- URL: https://github.com/alexphanna/battleship
- Owner: alexphanna
- Archived: true
- Created: 2023-02-07T20:33:38.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-24T16:39:51.000Z (about 2 years ago)
- Last Synced: 2025-02-20T04:16:09.977Z (2 months ago)
- Topics: battleship
- Language: Java
- Homepage:
- Size: 104 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Battleship
Made for AP Computer Science A
![]()
**Ship placing screen**
![]()
**Torpedo targeting and firing screen**
![]()
**Current status of the player's ship class**
## Features
- [x] Abstract ship object class w/ instance variables for size
- [x] Inherited children for ship types (Carrier, Battleship, Cruiser, Submarine, Destroyer)
- [x] 10 by 10 2D primitive integer arrays to represent ship positions
- [x] A grid class that extends a JPanel w/ a GridLayout that displays the 2D arrays
- [x] Fully functional interface w/ draggable ships and accurate displaying of the 2D arrays
- [X] 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