Rename cash-out to auto-advance
This commit is contained in:
+1
-1
@@ -28,7 +28,7 @@
|
|||||||
Points: <span id="points">?</span>
|
Points: <span id="points">?</span>
|
||||||
<br>
|
<br>
|
||||||
<button onclick="reset();">Reset</button>
|
<button onclick="reset();">Reset</button>
|
||||||
<button onclick="cashOut();">Cash out</button>
|
<button onclick="cashOut();">Auto Advance</button>
|
||||||
<input type="checkbox" onclick="toggleAutoDraw(this)" id="autoDrawToggle" /><label for="autoDrawToggle">Auto-Draw</label>
|
<input type="checkbox" onclick="toggleAutoDraw(this)" id="autoDrawToggle" /><label for="autoDrawToggle">Auto-Draw</label>
|
||||||
<br>
|
<br>
|
||||||
<div style="margin-top: 1.4em;" id="result">?</div>
|
<div style="margin-top: 1.4em;" id="result">?</div>
|
||||||
|
|||||||
@@ -146,11 +146,11 @@ function cashOut(thisHand = null) {
|
|||||||
handGiven = false;
|
handGiven = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("Recommendation: ");
|
// console.log("Recommendation: ");
|
||||||
console.log(recommendations[0]);
|
// console.log(recommendations[0]);
|
||||||
|
|
||||||
if (recommendations[0].burnedCard) {
|
if (recommendations[0].burnedCard) {
|
||||||
console.log("Discarding: " + recommendations[0].burnedCard);
|
// console.log("Discarding: " + recommendations[0].burnedCard);
|
||||||
discard(recommendations[0].burnedCard, thisHand, false);
|
discard(recommendations[0].burnedCard, thisHand, false);
|
||||||
}
|
}
|
||||||
else if (recommendations[0].pattern && recommendations[0].cards) {
|
else if (recommendations[0].pattern && recommendations[0].cards) {
|
||||||
@@ -162,12 +162,12 @@ function cashOut(thisHand = null) {
|
|||||||
recommendations = [];
|
recommendations = [];
|
||||||
|
|
||||||
for (let cardId of localCards) {
|
for (let cardId of localCards) {
|
||||||
console.log("Redeeming: " + cardId);
|
// console.log("Redeeming: " + cardId);
|
||||||
discard(cardId, thisHand, false);
|
discard(cardId, thisHand, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
globalPoints += localPoints;
|
globalPoints += localPoints;
|
||||||
console.log("Cashed out: " + (localPoints * pointsMultiplier) + " points");
|
// console.log("Cashed out: " + (localPoints * pointsMultiplier) + " points");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!handGiven) {
|
if (!handGiven) {
|
||||||
@@ -175,7 +175,7 @@ function cashOut(thisHand = null) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.log("Nothing to cash out.");
|
// console.log("Nothing to do.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user