
-----------------------------------
Tony_200004
Sat Jan 10, 2004 11:09 am

Blackjack
-----------------------------------
well basicly i have a fairly good blackjack game going on right now but still got a few problems... cant post the code here becuase its for my isu but i will tell you what i can... basicly i have to make it so the dealer doesnt get more cards after he has 17... this is more complicating that it looks because a simple if dealer card>17 then hit type thing screws with the program.  when you have this code added when it reaches the point with it, it resets the program

-----------------------------------
shorthair
Sat Jan 10, 2004 12:19 pm


-----------------------------------
My blackjack was fully graphical and complette , but you should still be able to use 

if dealerhand is >=17 then
dealerhit := false
else 
dealerhit :=true
end if

you will need to hit systems one for hte osuer and one for the computer

-----------------------------------
Tony_200004
Sat Jan 10, 2004 4:24 pm


-----------------------------------
thanks i will try that... and could you just explain to me what the true and false stuff mean??

-----------------------------------
santabruzer
Sat Jan 10, 2004 4:28 pm


-----------------------------------
it is a boolean variable..
basically it has two modes : true and false.. on or off.. 1 or 0... but here.. it's just true and false  :P

-----------------------------------
Tony_200004
Sat Jan 10, 2004 4:40 pm


-----------------------------------
this is how i did it... work perfectly thank you so very much

if card6 + card7 + card8 >= 17 then
                        card9 := 0
                    else
                        randint (card9, 1, 10)
                        card9 := card9
                    end if


-----------------------------------
shorthair
Sat Jan 10, 2004 4:57 pm


-----------------------------------
looks good , im glad you got it

-----------------------------------
Tony
Sat Jan 10, 2004 5:20 pm


-----------------------------------
now I would say that you have a 4/14 chance of getting a 10... but seeing as you just started with turing, I dont think it matters.

if you want to get ahead in CS, I sujest learning arrays, we have two tutorials available 8)

-----------------------------------
Tony_200004
Sun Jan 11, 2004 10:24 am


-----------------------------------
I know my code is longer than it need because i am just using intergers not array but still im in a grade 10 turing basics class so he shouldn't care but i do want to learn the arrays... also it is due tomorrow so their is no time to change it.... i looked at the tutorials and i didnt understand them so can anyone please post a exaple program that does it for numbers... thanks
