This repository was archived by the owner on Oct 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Konstantin_Ivanov #48
Open
kostya23azaza
wants to merge
53
commits into
master
Choose a base branch
from
feature/konstantinIvanov
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
076a20a
ds
kostya23azaza 6bf9f8e
ds
kostya23azaza 592a770
first_homework
kostya23azaza 17484b9
first_homework
kostya23azaza fb055d7
Merge remote-tracking branch 'origin/master' into feature/Konstantin_…
kostya23azaza e5c1fbf
first_homework
kostya23azaza 366079a
first_homework
kostya23azaza 13419a1
first_homework
kostya23azaza ad6354c
second_homework
kostya23azaza 3e4884f
first_homework_again i have no idea what do i do wrong
kostya23azaza cf48abe
Create README.md
kostya23azaza 7b1def2
Update README.md
kostya23azaza 9c67241
Update README.md
kostya23azaza cfdb99b
fixed RandomCharsTable task
kostya23azaza 5bb35c2
delete Main
kostya23azaza 98700eb
Merge remote-tracking branch 'origin/Feature/konstantinIvanov' into f…
kostya23azaza 29a0bf5
Merge branch 'master' into feature/konstantinIvanov
ArtemNikolaev1 cb875be
add start method!
kostya23azaza 4ed07ef
add start method!
kostya23azaza 1276e48
Delete PyramidPrinter.java
kostya23azaza b2d1c27
Delete RandomCharsTable.java
kostya23azaza 884d144
Update README.md
kostya23azaza d34e189
add start method!
kostya23azaza ca87723
Merge remote-tracking branch 'origin/master' into Feature/konstantinI…
kostya23azaza 9c257ed
add start method!
kostya23azaza c834134
add junit test on homework
kostya23azaza 9f89578
fixed little bugs
kostya23azaza 6fb521e
add singleton class
kostya23azaza 1644b84
add singleton class
kostya23azaza 61d07ec
add customFileReader class
kostya23azaza 4233fb2
add custom test annotation
kostya23azaza 8082d30
Update README.md
kostya23azaza 356fcff
fix small bug
kostya23azaza 4f4eb47
add homework_5 with CustomRegexMatcher task plus PowerOfNumber task
kostya23azaza 145e652
add homework_6
kostya23azaza b682108
fix bugs in homework 2 and 3
kostya23azaza c4dc14e
add homework_7
kostya23azaza eaba51c
Update README.md
kostya23azaza 872a384
Update README.md
kostya23azaza 2f9216a
Update README.md
kostya23azaza cc7d57e
Update README.md
kostya23azaza ac5a26f
Update README.md
kostya23azaza 38c1376
Update README.md
kostya23azaza 4272a70
Update README.md
kostya23azaza 73d3be4
Create README.md
kostya23azaza a383a51
add course project seaBattle
kostya23azaza b179ea0
Merge remote-tracking branch 'origin/Feature/konstantinIvanov' into F…
kostya23azaza 9e131ed
fix bugs in homework 3 and homework 6
kostya23azaza a3ed72d
fix bugs in homework 6 and in test for homework 2
kostya23azaza 3b99362
add test for seaBattle
kostya23azaza 9b54d78
fix homework 3
kostya23azaza f0bbc5f
fix homework 6
kostya23azaza ee58141
fix homework 7 and junit test in homework 2 PyramidPrinterTest
kostya23azaza File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,21 @@ | ||
| # Java Core June 2021 | ||
|
|
||
| ## *Nikolaev Artem* | ||
| ## *Konstantin Ivanov* | ||
|
|
||
| | Number | Solution | Short description | ||
| | --- | --- | --- | | ||
| | HW1 | [Console printer](https://github.com/NikolaevArtem/Java_Core_June_2021/tree/master/src/main/java/homework_1) | The app that reads input arguments and prints them, until "error" argument | | ||
| | HW1 | [Console printer](https://github.com/NikolaevArtem/Java_Core_June_2021/blob/feature/konstantinIvanov/src/main/java/homework_1/Main.java) | The app that reads input arguments and prints them, until "error" argument | | ||
| | HW2 | [TrafficLight homework](https://github.com/NikolaevArtem/Java_Core_June_2021/blob/feature/konstantinIvanov/src/main/java/homework_2/traffic_light/Main.java) | App reads current time in seconds from the console and prints the traffic light | | ||
| | HW2 | [Pyramid homework](https://github.com/NikolaevArtem/Java_Core_June_2021/blob/feature/konstantinIvanov/src/main/java/homework_2/pyramid_printer/Main.java) | The app that reads input argument and builds pyramid base on input value | | ||
| | HW2 | [RandomCharsTable homework](https://github.com/NikolaevArtem/Java_Core_June_2021/blob/feature/konstantinIvanov/src/main/java/homework_2/random_chars_table/Main.java) | App reads from the console width and length of the chart, strategy keyword (even or odd). Prints to the console the chart of random chars from A to Z | | ||
| | HW3 | [ImmutableClass homework](https://github.com/NikolaevArtem/Java_Core_June_2021/blob/feature/konstantinIvanov/src/main/java/homework_3/ImmutableClass.java) | Immutable class | | ||
| | HW4 | [Singleton homework](https://github.com/NikolaevArtem/Java_Core_June_2021/blob/feature/konstantinIvanov/src/main/java/homework_4/Singleton/MySingleton.java) | Singleton | | ||
| | HW4 | [CustomFileReader homework](https://github.com/NikolaevArtem/Java_Core_June_2021/blob/feature/konstantinIvanov/src/main/java/homework_4/custom_file_reader/CustomFileReader.java) | The app that reads from a file using nio io | | ||
| | HW4 | [CustomAnnotation homework](https://github.com/NikolaevArtem/Java_Core_June_2021/blob/feature/konstantinIvanov/src/main/java/homework_4/custom_annotation/test_annotation/Main.java) | The app has three annotation, BeforeSuite, which runs once at the beginning, AfterSuite, which runs once at the end, and Test which runs methods by priority | | ||
| | HW5 | [CustomRegexMatcher homework](https://github.com/NikolaevArtem/Java_Core_June_2021/blob/feature/konstantinIvanov/src/main/java/homework_5/customRegexMatcher/CustomRegexMatcher.java) | The app with customRegexMatcher | | ||
| | HW5 | [PowerOfNumber homework](https://github.com/NikolaevArtem/Java_Core_June_2021/blob/feature/konstantinIvanov/src/main/java/homework_5/powerOfNumber/PowerOfNumber.java) | The app realizes PowerOfNumber method which using recursion | | ||
| | HW6 | [MapProblemsGenerator homework](https://github.com/NikolaevArtem/Java_Core_June_2021/blob/feature/konstantinIvanov/src/main/java/homework_6/MapProblemsCollisionGenerator.java) | The app has two classes, MapProblemsCollisionGenerator which creates 100% collision and MapProblemsMutableGenerator with hashcoreEquals | | ||
| | HW7 | [KittenToCatFunction homework](https://github.com/NikolaevArtem/Java_Core_June_2021/blob/feature/konstantinIvanov/src/main/java/homework_7/KittenToCat.java) | This app transform Kitten to Cat | | ||
|
|
||
| [Link to markdown giude](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) | ||
|
|
||
| [Link to CodingBat](https://codingbat.com/done?user=kostya-ivanov9623@mail.ru&tag=8599662828) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| package course_project.seaBattle; | ||
|
|
||
|
|
||
| import java.util.Arrays; | ||
|
|
||
| import static course_project.seaBattle.Field.*; | ||
|
|
||
| public class Computer { | ||
| private String name; | ||
|
|
||
| public String getName() { | ||
| return name; | ||
| } | ||
|
|
||
| public Computer(String name) { | ||
| this.name = name; | ||
| for (int i = 0; i < computer_field.length; i++) { | ||
| Arrays.fill(computer_field[i], '*'); | ||
| Arrays.fill(fake_field[i], '*'); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| package course_project.seaBattle; | ||
|
|
||
| import java.util.Random; | ||
| import java.util.Scanner; | ||
|
|
||
| public class Field { | ||
| public static final int SIZE = 10; | ||
| public static char[][] player_field = new char[SIZE][SIZE]; | ||
| public static char[][] computer_field = new char[SIZE][SIZE]; | ||
| public static char[][] fake_field = new char[SIZE][SIZE]; | ||
| public static int playerShip = 20; | ||
| public static int computerShip = 20; | ||
|
|
||
| public static void printBattleField(char[][] field) { | ||
| for (int i = 0; i < SIZE; i++) { | ||
| if (i == 0) { | ||
| for (int k = 0; k < SIZE; k++) { | ||
| System.out.print("\t" + k); | ||
| } | ||
| System.out.println(); | ||
| } | ||
| System.out.print(i); | ||
| for (int j = 0; j < SIZE; j++) { | ||
| System.out.print("\t" + field[i][j]); | ||
| } | ||
| System.out.println(); | ||
| } | ||
| } | ||
|
|
||
| public static void printAllMaps(Player user, course_project.seaBattle.Computer computer) { | ||
| System.out.print("\t=========" + user.getName() + "========"); | ||
| System.out.println("\t\t\t\t \t=======" + computer.getName() + "======="); | ||
| System.out.print(" "); | ||
| for (int i = 0; i < SIZE; i++) { | ||
| System.out.print(i + " "); | ||
| } | ||
| System.out.print("\t\t "); | ||
| for (int i = 0; i < SIZE; i++) { | ||
| System.out.print(i + " "); | ||
| } | ||
|
|
||
| System.out.print("\n"); | ||
| for (int i = 0; i < 10; i++) { | ||
| System.out.print(i + " "); | ||
| for (int j = 0; j < 10; j++) { | ||
| System.out.print(player_field[i][j] + " "); | ||
| } | ||
| System.out.print("\t\t"); | ||
| System.out.print(i + " "); | ||
| for (int k = 0; k < 10; k++) { | ||
| System.out.print(computer_field[i][k] + " "); | ||
| } | ||
| System.out.print("\n"); | ||
| } | ||
| } | ||
| public static void playerShoot(Scanner scanner, char[][] field) { | ||
| while (true) { | ||
| try { | ||
| System.out.println("Print the coordinate x"); | ||
| int x = scanner.nextInt(); | ||
| System.out.println("Print the coordinate y"); | ||
| int y = scanner.nextInt(); | ||
| if (field[x][y] == 'X') { | ||
| System.out.println("GOAL"); | ||
| System.out.println("Nice shot"); | ||
| field[x][y] = '@'; | ||
| fake_field[x][y] = '@'; | ||
| computerShip--; | ||
| printBattleField(fake_field); | ||
| if (computerShip == 0) { | ||
| return; | ||
| } | ||
| } else { | ||
| System.out.println("You missed"); | ||
| field[x][y] = '-'; | ||
| fake_field[x][y] = '-'; | ||
| printBattleField(fake_field); | ||
| return; | ||
| } | ||
| } catch (ArrayIndexOutOfBoundsException e) { | ||
| System.out.println("You can use number from 0 to 9"); | ||
| break; | ||
| } catch (Exception e) { | ||
| throw new RuntimeException("Error, you must use only number"); | ||
| } | ||
| } | ||
| } | ||
| public static void computerShoot(char[][] field, Random random) { | ||
| while (true) { | ||
| int x = random.nextInt(10); | ||
| int y = random.nextInt(10); | ||
| if (field[x][y] == 'X') { | ||
| System.out.println("Computer shot your ship"); | ||
| field[x][y] = '@'; | ||
| playerShip--; | ||
| printBattleField(player_field); | ||
| if (playerShip == 0) { | ||
| return; | ||
| } | ||
| } else if (field[x][y] == '@' || field[x][y] == '-') { | ||
|
|
||
| } else { | ||
| System.out.println("Computer missed"); | ||
| field[x][y] = '-'; | ||
| printBattleField(player_field); | ||
| return; | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| package course_project.seaBattle; | ||
|
|
||
|
|
||
| import java.util.Random; | ||
| import java.util.Scanner; | ||
|
|
||
| import static course_project.seaBattle.Field.*; | ||
| import static course_project.seaBattle.Field.computerShip; | ||
| import static course_project.seaBattle.Ship.*; | ||
|
|
||
| public class Game { | ||
| Scanner scanner = new Scanner(System.in); | ||
| Random rand = new Random(); | ||
|
|
||
| public static boolean checkWin(int playerShip, int computerShip) { | ||
| if (playerShip == 0) { | ||
| System.out.println("Computer win -_-"); | ||
| return false; | ||
| } else if (computerShip == 0) { | ||
| System.out.println("You win!!"); | ||
| return false; | ||
| } else { | ||
| return true; | ||
| } | ||
| } | ||
|
|
||
| public void run() { | ||
| System.out.println("Print your name"); | ||
| Player User = new Player(scanner.nextLine()); | ||
| course_project.seaBattle.Computer computer = new course_project.seaBattle.Computer("Computer"); | ||
| randomGenerateShip(player_field, rand); | ||
| printAllMaps(User, computer); | ||
| randomGenerateShip(computer_field, rand); | ||
| System.out.println("Start game"); | ||
| do { | ||
| playerShoot(scanner, computer_field); | ||
| computerShoot(player_field, rand); | ||
| } | ||
| while (checkWin(playerShip, computerShip)); | ||
| System.out.println(" End "); | ||
| System.out.println("if you like this game you can buy it for three hundred bucks"); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| package course_project.seaBattle; | ||
|
|
||
| public class Main { | ||
|
|
||
| public static void main(String[] args) { | ||
| new Game().run(); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| package course_project.seaBattle; | ||
|
|
||
|
|
||
| import java.util.Arrays; | ||
|
|
||
| import static course_project.seaBattle.Field.*; | ||
|
|
||
| public class Player { | ||
| private String name; | ||
| public String getName() { | ||
| return name; | ||
| } | ||
|
|
||
| public Player(String name) { | ||
| this.name = name; | ||
| for (int i = 0; i < player_field.length; i++) { | ||
| Arrays.fill(player_field[i], '*'); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| package course_project.seaBattle; | ||
|
|
||
|
|
||
| import java.util.Random; | ||
|
|
||
| import static course_project.seaBattle.Field.SIZE; | ||
|
|
||
| public class Ship { | ||
| int positionY; | ||
| int positionX; | ||
| int size; | ||
| boolean isVertical; | ||
| int health; | ||
| public static Ship[] ships = new Ship[10]; | ||
|
|
||
| public Ship(int positionX, int positionY, int size, boolean isVertical) { | ||
| this.positionX = positionX; | ||
| this.positionY = positionY; | ||
| this.size = size; | ||
| this.isVertical = isVertical; | ||
| this.health = size; | ||
| } | ||
|
|
||
| public static void randomGenerateShip(char[][] field, Random rand) { | ||
| for (int i = 0; i < 10; i++) { | ||
| boolean isShipPlaced = false; | ||
| do { | ||
| if (i == 0) ships[i] = new Ship(rand.nextInt(10), rand.nextInt(10), 4, rand.nextBoolean()); | ||
| if (i > 0 && i <= 2) | ||
| ships[i] = new Ship(rand.nextInt(10), rand.nextInt(10), 3, rand.nextBoolean()); | ||
| if (i > 2 && i <= 5) | ||
| ships[i] = new Ship(rand.nextInt(10), rand.nextInt(10), 2, rand.nextBoolean()); | ||
| if (i > 5) ships[i] = new Ship(rand.nextInt(10), rand.nextInt(10), 1, rand.nextBoolean()); | ||
| if (canSetShip(ships[i], field)) { | ||
| setShipOnField(ships[i], field); | ||
| isShipPlaced = true; | ||
| } | ||
| } while (!isShipPlaced); | ||
| } | ||
| } | ||
| private static void setShipOnField(Ship ship, char[][] field) { | ||
| if (ship.isVertical) { | ||
| for (int i = 0; i < ship.size; i++) { | ||
| field[ship.positionX][ship.positionY + i] = 'X'; | ||
| } | ||
| } else { | ||
| for (int i = 0; i < ship.size; i++) { | ||
| field[ship.positionX + i][ship.positionY] = 'X'; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| private static boolean canSetShip(Ship ship, char[][] field) { | ||
| if (ship.positionX < 0 || ship.positionY < 0 || SIZE <= ship.positionX || SIZE <= ship.positionY) | ||
| return false; | ||
| if (ship.isVertical && SIZE <= ship.positionY + ship.size) return false; | ||
| if (!ship.isVertical && SIZE <= ship.positionX + ship.size) return false; | ||
| int minX = Math.max(0, ship.positionX - 1); | ||
| int minY = Math.max(0, ship.positionY - 1); | ||
| int maxX = Math.min(SIZE - 1, ship.positionX + 1 + (ship.isVertical ? 0 : ship.size)); | ||
| int maxY = Math.min(SIZE - 1, ship.positionY + 1 + (ship.isVertical ? ship.size : 0)); | ||
| for (int x = minX; x <= maxX; x++) { | ||
| for (int y = minY; y <= maxY; y++) { | ||
| if (isShipPresent(x, y, field)) return false; | ||
| } | ||
| } | ||
| return true; | ||
| } | ||
|
|
||
| private static boolean isShipPresent(int x, int y, char[][] field) { | ||
| return field[x][y] == 'X'; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| package homework_2.pyramid_printer; | ||
|
|
||
| import java.io.IOException; | ||
|
|
||
| public class Main { | ||
|
|
||
| public static void main(String[] args) { | ||
| new PyramidPrinter().run(); | ||
| } | ||
| } |
35 changes: 35 additions & 0 deletions
35
src/main/java/homework_2/pyramid_printer/PyramidPrinter.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| package homework_2.pyramid_printer; | ||
|
|
||
|
|
||
| import java.io.BufferedReader; | ||
| import java.io.IOException; | ||
| import java.io.InputStreamReader; | ||
|
|
||
| public class PyramidPrinter { | ||
|
|
||
| public void run() { | ||
| try (BufferedReader reader = new BufferedReader(new InputStreamReader(System.in))) { | ||
| int rows = Integer.parseInt(reader.readLine()); | ||
| if (rows<0) { | ||
| System.out.println("Only 1 non-negative integer is allowed as passed parameter"); | ||
| return; | ||
| } | ||
| printPyramid(rows); | ||
| } catch (IOException e) { | ||
| e.printStackTrace(); | ||
| return; | ||
| } catch (NumberFormatException e){ | ||
| System.out.println("Only 1 non-negative integer is allowed as passed parameter"); | ||
| return; | ||
| } | ||
| } | ||
|
|
||
| static void printPyramid(int rows){ | ||
| for (int i = 1; i <= rows; i++) { | ||
| for (int j = 0; j < i; j++) { | ||
| System.out.print("x"); | ||
| } | ||
| System.out.println(); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| package homework_2.random_chars_table; | ||
|
|
||
| import java.io.IOException; | ||
|
|
||
| public class Main { | ||
|
|
||
| public static void main(String[] args) { | ||
| new RandomCharsTable().run(); | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strange behaviour in case of wrong input

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
opt: No any message in case I fully destroyed opponent's ship
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opt: when ship is destroyed, close cells are not marked as already hit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also strange, but okay

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I do like simplicity of the approach, nice interface and abstractions.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good! There are a few bugs to fix, except that looks good. You could also introduce some abstractions, like abstract classes/interfaces, but it's optional. As well as testing the app
Btw, why do you need fakeField?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SeaBattle has the same bugs as before. Please fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, can't approve with current bugs