-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hazel branch #24
base: master
Are you sure you want to change the base?
Hazel branch #24
Conversation
game interface. dice game abstract class.
goFishDisplay and dice abstract class
Hazel branch
drew a beetle. Player class.
Wrote methods for PlayerWarehouse class
Interfaces + bj display
Refactoring Beetle.
BeetleService added. more tests.
d.printErrorMessage(); | ||
} | ||
|
||
if(currentPlayer.getName() != "TIMBERDOODLE72"){ |
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.
I detect that this code is problematic. According to the Bad practice (BAD_PRACTICE), ES: Comparison of String objects using == or != (ES_COMPARING_STRINGS_WITH_EQ).
This code compares java.lang.String objects for reference equality using the == or != operators. Unless both strings are either constants in a source file, or have been interned using the String.intern() method, the same string value may be represented by two different String objects. Consider using the equals(Object) method instead.
} | ||
|
||
public void getRankToAskFor_Computer() { | ||
int pickCard = (int) Math.random() * (this.dealersHand.size() - 1); |
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.
I detect that this code is problematic. According to the Correctness (CORRECTNESS), RV: Random value from 0 to 1 is coerced to the integer 0 (RV_01_TO_INT).
A random value from 0 to 1 is being coerced to the integer value 0. You probably want to multiply the random value by something else before coercing it to an integer, or use the Random.nextInt(n) method.
} | ||
|
||
@Test | ||
public void TestGetValueOfCard() { |
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.
I detect that this code is problematic. According to the Bad practice (BAD_PRACTICE), Nm: Method names should start with a lower case letter (NM_METHOD_NAMING_CONVENTION).
Methods should be verbs, in mixed case with the first letter lowercase, with the first letter of each internal word capitalized.
Minor fix to a small error I made while merging
# Conflicts: # src/main/java/io/zipcoder/casino/Casino.java # src/main/java/io/zipcoder/casino/CrapsV2.java # src/main/java/io/zipcoder/casino/GoFish.java # src/main/java/io/zipcoder/casino/GoFishDisplay.java # src/main/java/io/zipcoder/casino/GoFishEngine.java
# Conflicts: # src/main/java/io/zipcoder/casino/Casino.java # src/main/java/io/zipcoder/casino/GoFish.java
No description provided.