Conversation
…o feature/ReginaGabdrakhimova
|
Seems forgotten |
| @@ -0,0 +1,7 @@ | |||
| package course_project; | |||
|
|
|||
| public class Main { | |||
There was a problem hiding this comment.
Good job! The game is playable and has a nice description, the code is pretty readable. It seems there are some bugs, good that you have automatic ship placement, the interface is cool. You show knowledge of Java Core and Java libraries. Abstractions and architecture is TBD
To make it better: add some features (like automatically mark cells around destroyed ship as miss), introduce the architecture, and more abstractions.
Ping me when you resolved this bug and tested your app manually for other bugs (like, what happens if the computer hits a cell already marked as a miss?)
There was a problem hiding this comment.
Opt: Also, there are no messages what happened - did computer (or me) hit or miss, how many times computer shot and etc...
| public MyImmutableBag changeCash(int newCash) { | ||
| return new MyImmutableBag(newCash, documents, pills); | ||
| } | ||
|
|
||
| public MyImmutableBag changeDocuments(ArrayList<String> newDocuments) { | ||
| return new MyImmutableBag(cash, newDocuments, pills); | ||
| } | ||
|
|
||
| public MyImmutableBag changePills(Map<String, String> newPills) { | ||
| return new MyImmutableBag(cash, documents, newPills); | ||
| } | ||
| } |
There was a problem hiding this comment.
Here you don't make a copy of mutable objects, thus your class is mutable
|
|
||
| public class CustomRegexMatcher { | ||
|
|
||
| public void run() { |
There was a problem hiding this comment.
Nice example with different messages!
| public int hashCode() { | ||
| return new Random().nextInt(121); | ||
| } |
There was a problem hiding this comment.
I know it's unclear from the homework description, but here is not a mutable key problem, it's just invalid hashcode impl. Mutable key problem appears when hashcode generation is valid
| @@ -0,0 +1,24 @@ | |||
| package homework_7; | |||
|
|
|||
| public class Main { | |||
There was a problem hiding this comment.
Nice, great example with type conversion!
There was a problem hiding this comment.
Are there any issues in homework 7? Label has not been tagged
NikolaevArtem
left a comment
There was a problem hiding this comment.
Good job! The code is readable, covered by tests, I see you experimented with most of what we've learned in lectures. There are some minor issues to fix and a bug in Cource project TBD


Completed homework_1