This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @class DecimalFormat | |
* @constructor | |
* @param {String} formatStr | |
* @author Oskan Savli | |
*/ | |
export default function DecimalFormat(formatStr) { | |
this.decimalSeparator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '.'; | |
this.groupSeparator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ','; | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Boolean hasStraightFlush_plainJava() { | |
Suit expectedSuit = cards.get(0).getSuit(); | |
int minValue = cards.get(0).getValue().ordinal(); | |
for (int i = 1; i < 5; i++) { | |
Card card = cards.get(i); | |
if (card.getValue().ordinal() != minValue + i) { | |
return false; | |
} | |
if (card.getSuit() != expectedSuit) { | |
return false; |