Closed dbravender closed 3 months ago
commit e7875b7735502675a650a37a49a43de162564530
Author: Dan Bravender <dan@bravender.net>
Date: Tue Aug 27 21:47:17 2024 -0400
Hotdog: use 1-9 for all suits
diff --git a/lib/hotdog/game.dart b/lib/hotdog/game.dart
index aad91c3..5c52849 100644
--- a/lib/hotdog/game.dart
+++ b/lib/hotdog/game.dart
@@ -14,13 +14,6 @@ enum Suit {
yellow,
}
-var suitOffsets = <Suit, int>{
- Suit.red: 0,
- Suit.green: 1,
- Suit.blue: 2,
- Suit.yellow: 3,
-};
-
@JsonSerializable()
class Card {
final int id;
@@ -55,9 +48,8 @@ List<Card> deck([Random? random]) {
List<Card> deck = [];
int id = 0;
for (var suit in Suit.values) {
- int offset = suitOffsets[suit]!;
for (var value in [1, 2, 3, 4, 5, 6, 7, 8, 9]) {
- deck.add(Card(id: id++, value: value + offset, suit: suit));
+ deck.add(Card(id: id++, value: value, suit: suit));
}
}
return deck;
This bug came from copying the
deck
construction code from Yokai Septet 2-player. The engine was still using the correct numbers. The fix for this is in the UI code only and will be in the next beta release.