fac26 / week5-clientside-dgn

FAC26 | Week 5: Client Side App project
https://week5-clientside-dgn.netlify.app/
0 stars 0 forks source link

Ace value? #28

Open Psydwinder opened 1 year ago

Psydwinder commented 1 year ago

There is a random bug where the Ace's value is 11 when placed alongside a Jack to get 21. But when we hit we got 31. Which means the value of the Ace is already decided to be 11 regardless. It might have something to do with the following line of code:

https://github.com/fac26/week5-clientside-dgn/blob/2f1dcc15338ecf02f7e283586e86a6bf76f0f09b/src/Components/Game.jsx#L115

Psydwinder commented 1 year ago

It might have something to do with the fact that its only looking at the total above 21 not equal to or above 21