Compare commits

..

2 Commits

Author SHA1 Message Date
me b3e955b38a Add comment explaining why 13 is being used, not 11. 2026-05-21 14:23:27 -07:00
me 447182c3bf Use the debugPrint command so that it does not happen in production.
Pass the board directly rather than with an intermediate variable.
2026-05-21 14:23:13 -07:00
+3 -4
View File
@@ -11,7 +11,7 @@ class MyLogger {
if (method.isNotEmpty) {
stdout.write(" - $method");
}
print(": $output");
debugPrint(": $output");
}
}
@@ -291,12 +291,10 @@ class PlayerSpot extends StatefulWidget {
}
class _PlayerSpotState extends State<PlayerSpot> {
List<int> BOARD = [];
int _spot = -2;
@override
void initState() {
BOARD = widget.board;
_spot = widget.spot;
super.initState();
}
@@ -307,7 +305,7 @@ class _PlayerSpotState extends State<PlayerSpot> {
w: 50,
h: 100,
spot: _spot,
board: BOARD,
board: widget.board,
boardUpdate: null,
);
}
@@ -426,6 +424,7 @@ List<int> gameTurn(List<int> board, int spot) {
((boolTopPlayerTurn && spot >= 7) || (!boolTopPlayerTurn && spot <= 6))) {
// Spot 00 steals 11, 01 steals 10, ... 05 steals 06.
// This is a function of (spot_to_check = 11 - spot)
// Changed to 14 spots, so now using 13 rather than 11.
int spotToCheck = 13 - spot;
int theft = board[spotToCheck % 14];
if (boolTopPlayerTurn) {