Bachelor in Computer Science and Engineering (LEI) | 1st Year - 1st Semester
This repository contains the final project developed for the Introduction to Programming course at the Faculty of Sciences and Technology of the NOVA University of Lisbon (NOVA FCT).
- Tomás Alves (Student No. 68681)
- Santiago Oliveira (Student No. 68549)
The official project assignment and specifications provided by the faculty can be found here:
The project consisted of developing a console-based version of the classic Battleship game, fully programmed in Java. The game supports multiple players, loading fleets through text files, and a scoring system based on the size and destruction of the ships.
- Multiplayer: Support for multiple players simultaneously in the terminal.
- Configuration Files: Reading fleet layouts through an external text file (
fleets.txt) - I don't have access to that file 🙁 - Scoring System: Dynamic point calculation based on successful hits and the size of the sunk ship.
- Console Commands:
player: Shows whose turn it is.fleet: Displays the current state of a player's fleet grid.shoot <row> <column> <name>: Fires a shot at a specific player's grid.scores/score <name>: Checks the leaderboard.players: Lists the players still in the game.quit: Ends the match and announces the winner.
As the foundational programming project, it allowed for the consolidation of essential Object-Oriented Programming (OOP) and algorithm structuring concepts:
- Basic Data Structures: Intensive manipulation of 1D and 2D Arrays to manage game grids.
- File I/O: Use of the
Scannerclass for reading and processing structured text files. - Classes and Objects: Encapsulation of game logic into distinct classes (
Game,Player,IteratorPlayer,Main...). - Basic Design Patterns: Implementation of a custom iterator (
IteratorPlayer) to traverse active players sorted by score.
Copyright © 2026 Alvesss04. All Rights Reserved.