One of my school projects I did at the University Of Minnesota Twin-Cities Battleship game played through terminal. The code is written in Java. If you want to play this Java BattleShip game you can do the following.
First off, make sure you have Java downloaded onto your computer. Make sure you go to his site below and download the right Java files for your OS
https://www.java.com/en/download/
Once you have Java downloaded you are now able to run Java files.
Second step, Make sure you downloaded the source code for this battle ship game. You could either clone the repo into your terminal, or you can just downloaded the files individually.
git clone <your repo link > #you should see this when you click code and hit clone
To execute the game, use the following commands
javac BattleboatsBoard.java
javac Game.java
This will then compile both of the Java files giving you an executable.
Finally, Run the command
java Game
This should prompt the board and game into your terminal window!
Have fun!