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.
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.
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.
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.