Workshop › Blackjack › Step 13 of 22
You play for chips. You start with 100, and every deal puts a bet of 10 on the table. reset starts a whole new game:
full chips, a new deck, the first deal.
```js
const START = 100 // chips at the start
const BET = 10
let bank
let bet
bet = BET
bank -= bet
function reset() {
bank = START
newDeck()
deal()
}
ctx.fillText('Chips ' + bank + ' Bet ' + bet, 20, 28)
reset()
```bank is the chips you hold, bet the chips on the table this round.reset() replaces newDeck() and deal(): it calls both.PLAYER_Y, write START and BET; under phase, write bank and bet.deal, place the bet.press, write reset; at the bottom, call it instead of newDeck() and deal().draw, write the chips under your total.Skills: Game states