File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -409,21 +409,21 @@ Deckdle.modalOpen = async (type) => {
409409
410410 // win
411411 if ( tableauCount == 0 ) {
412- // check if our stock count is better than the bots score
413- // (which will be a negative number for their stock count )
414- if ( stockCount > - botScore ) {
412+ // check if our stock count is better than the bot score
413+ // flip stockCount so it's negative (bot score will be negative, too )
414+ if ( - stockCount < botScore ) {
415415 modalText += `
416416 <div>🤖🤖🤖</div>
417417 <div>You <strong>beat</strong> the bot! <em>How on earth...?!?!</em></div>
418418 <div>🤖🤖🤖</div>
419419 `
420- } else if ( stockCount == botScore ) {
420+ } else if ( - stockCount == botScore ) {
421421 modalText += `<div>🤖 You matched the bot! <strong>Holy cowabunga!</strong> 🤖</div>`
422422 }
423423 }
424424 // loss
425425 else {
426- // check if our tableau count is better than the bots score
426+ // check if our tableau count is better than the bot score
427427 // (which will be a positive number for their tableau count)
428428 if ( tableauCount < botScore ) {
429429 modalText += `
You can’t perform that action at this time.
0 commit comments