I really like your code! It’s easy to read and follow what’s going on.
Honestly, the only thing I can see that you could improve are kinda nit picky, but hey, at least I have something for you.
In your abstract GameUi class, all of your methods are verbs except for “initialMessage”, which is a noun. I would change that to “displayInitialMessage” or some over verb-like name for consistency.
Same with the “whoWins” method in Ruleset class, and the “divider” method in your CliUi class.
The “isWinner” method of the Rule class feels weird to me. Maybe because it doesn’t make sense for a rule to be a “winner”? I don’t know, it could just be me.
In your abstract GameUi class, all of your methods are verbs except for “initialMessage”, which is a noun. I would change that to “displayInitialMessage” or some over verb-like name for consistency.
I really like this suggestion, I'm all in for this kind of changes!
The “isWinner” method of the Rule class feels weird to me. Maybe because it doesn’t make sense for a rule to be a “winner”? I don’t know, it could just be me.
I totally agree, funnily enough I had a really difficult time finding a better name for the "isWinner" method, so I decided to let that one slip until I found a better name. Do you have any suggestions?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I really like your code! It’s easy to read and follow what’s going on.
Honestly, the only thing I can see that you could improve are kinda nit picky, but hey, at least I have something for you.
In your abstract GameUi class, all of your methods are verbs except for “initialMessage”, which is a noun. I would change that to “displayInitialMessage” or some over verb-like name for consistency.
Same with the “whoWins” method in Ruleset class, and the “divider” method in your CliUi class.
The “isWinner” method of the Rule class feels weird to me. Maybe because it doesn’t make sense for a rule to be a “winner”? I don’t know, it could just be me.
Anyway, great work!
Thanks for the feedback and the kind words!
I really like this suggestion, I'm all in for this kind of changes!
I totally agree, funnily enough I had a really difficult time finding a better name for the "isWinner" method, so I decided to let that one slip until I found a better name. Do you have any suggestions?