Conversation
deleted extra directory
# Conflicts: # src/main/java/homework_1/Main.java
Co-authored-by: Artem Nikolaev <Nikolaev.artem.work@yandex.ru>
+ readme modified
+ readme modified
|
|
||
|
|
||
| public static void main(String[] args) throws IOException { | ||
| Battle.run(); |
There was a problem hiding this comment.
Quite good! You did PvP seabattle. Looks nice, interface is comfortable. Opt: add delays/enter between players, so they will not see each other fields. Also if ship is sunk, near cells can be marked as hit. But the game is good as-is.
There was a problem hiding this comment.
Nice abstractions, model/service segregation, the code is easy to read in general, I didn't find any bugs. Approved!
There was a problem hiding this comment.
it was planned, but had no time left. Thank you for checking. Will work on it later and have a whale of a time with my mates, encouraging them go programming)
| public class Main { | ||
|
|
||
|
|
||
| public static void main(String[] args) throws IOException { |
| public class Main { | ||
| public static void main(String[] args) { | ||
|
|
||
| new FirstProgram(); // with default value given by annotation |
| private static class SingletonHolder { | ||
| public static final Singleton INSTANCE_HOLDER = new Singleton(); | ||
| } | ||
|
|
||
| public static Singleton getInstance() { | ||
| return SingletonHolder.INSTANCE_HOLDER; | ||
| } |
There was a problem hiding this comment.
Opt: why do you need static class, why not to have just static variable?
src/main/java/homework_5/custom_regex_matcher/CustomRegexMatcher.java
Outdated
Show resolved
Hide resolved
| public interface KittenToCatFunction<Kitten> { | ||
| Cat grow(Kitten kitten); | ||
| } |
There was a problem hiding this comment.
Opt: Usually generics are letters, like K or C. Also I don't understand why you have only one generic - for my understanding, here should be 2 or none
There was a problem hiding this comment.
I think I should go through that topic again
NikolaevArtem
left a comment
There was a problem hiding this comment.
Nice work on SeaBattle, looks good, both interface and code. Some fixes needed in HW_3, HW_4 and HW_6. Also, please remove any Java11 code from repository.
| public interface KittenToCatFunction<K extends Kitten> { | ||
| Cat grow(K k); |
There was a problem hiding this comment.
| public interface KittenToCatFunction<K extends Kitten> { | |
| Cat grow(K k); | |
| public interface KittenToCatFunction<K extends Kitten, C extends Cat> { | |
| C grow(K kitten); |
Opt: That's what I meant

1st HW + README MODIFIED