Skip to content

Commit

Permalink
App version 1.1.1
Browse files Browse the repository at this point in the history
- Fixed calculation of cards not going over the deck number.
  • Loading branch information
Axiion committed Sep 22, 2021
1 parent 1c7284d commit afed055
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class _myAppState extends State<myApp> {
int roundNum = 1;
int energy = 3;
int cards = 6;
int deck = 24;
int deck = 18;
int destroy = 0,
gain = 0,
steal = 0,
Expand Down Expand Up @@ -53,7 +53,7 @@ class _myAppState extends State<myApp> {
roundNum = 1;
energy = 3;
cards = 6;
deck = 24;
deck = 18;
one = two =
zero = gain = destroy = steal = draw = discard = 0;
});
Expand Down Expand Up @@ -298,8 +298,8 @@ class _myAppState extends State<myApp> {
print("+1 0 card.");
setState(() {
zero += 1;
if (zero > deck) {
zero = deck;
if (zero > cards) {
zero = cards;
}
});
},
Expand Down Expand Up @@ -347,8 +347,8 @@ class _myAppState extends State<myApp> {
print("+1 1 card.");
setState(() {
one += 1;
if (one > deck) {
one = deck;
if (one > cards) {
one = cards;
}
});
},
Expand Down Expand Up @@ -396,8 +396,8 @@ class _myAppState extends State<myApp> {
print("+1 2 card.");
setState(() {
two += 1;
if (two > deck) {
two = deck;
if (two > cards) {
two = cards;
}
});
},
Expand Down

0 comments on commit afed055

Please sign in to comment.