User Tools

Site Tools


notes:discrete:fall2023:projects:bjm0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
notes:discrete:fall2023:projects:bjm0 [2023/10/26 20:29] – [GAMEPLAY] wgates1notes:discrete:fall2023:projects:bjm0 [2023/11/02 01:53] (current) – [Ace Logic] cfoster8
Line 94: Line 94:
  
  
 +====Dealer Strategy====
  
 +The dealer in blackjack always hits until hitting at least 17, and goes after the player does. A simple way of doing this is to out a check for if the player stands or busts towards the end of the loop, and set a flag if they do.
  
 +    if(stand == true || playerbust == true){}
 + 
 +Next you need a check to see if the dealer's cards already add up to 17 or greater, and if not then have them draw a card. You repeat this until the dealer has the correct value of cards, check if they bust or not, and if not then compare it to the player.
 =====CHANCES===== =====CHANCES=====
  
notes/discrete/fall2023/projects/bjm0.1698352184.txt.gz · Last modified: 2023/10/26 20:29 by wgates1