JavaRush /Java Blog /Random EN /The first project “Battleship”!
Kashey
Level 11
Olomouc

The first project “Battleship”!

Published in the Random EN group
Hello Javarash residents! I’m slowly starting to put together a portfolio, and I present to you my first project “Battleship”. Sources on GitHub compiled here . Explanations and hints in the code are written quickly and most likely with errors. The game still has one difficulty level, the computer still shoots randomly, and even when it hits, it still continues to shoot randomly. While it seems to me that the Battle class is heavily overloaded, maybe it’s worth moving filling the field with ships and printing fields from it to separate classes? The JCDP library allows you to highlight in color what is printed in cmd or terminal, but for some reason when using ColoredPrinterWIN in Windows it prints normally, but in IDEA the color is ignored, if you use ColoredPrinter it’s the other way around)) I would be glad to receive advice from more experienced programmers on improvements, code beauty, identifying possible bugs etc.
Comments
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION