Post by Eyesore on May 11, 2005 20:25:39 GMT -5
Here's a tutorial for a simple blackjack game, obviously you can modify whatever the hell you please. behold:
Message: you wanna play blackjack?
Show Choices: Yes/No
Yes: Set Variable "Hit1" to 0, Set Variable "Hit2" to 0... Set Variable "Hit5" to 0.
Set Variable Hit1 to a random number between 1-10
Message: You get a \v[x] (x equals the number of the variable Hit1 in the variable listings)
Show Choices:
Hit/Stay
Hit: Set Variable Hit2 to a random number between 1-10
Message: You get a \v[x]
(x now refers to the number for Hit2 in the variable listings)
Show Choices:
Hit/Stay
Hit: same as above, lather rinse repeat until you've hit for variable Hit5, in which case you automatically have to stay because you can only get five hits in blackjack
Stay (this should occur automatically after you get five cards as well, although it should always be a choice): Set Variable Hit6 to random number between 16-23
Set Variable Hit7 to Hit1+Hit2+Hit3+Hit4+Hit5
Message: You have a total of \v[x] (x now refers to the number in the variable listings for Hit7).
Message: Your opponent has a total of \v[x]
(x now refers to the number in the listings for Hit6)
Conditional Branch: If Hit7 is greater than 21 display Message: You lose, you busted
Else: Conditional Branch: If Hit6 is greater than 21, display message: you win, your opponent busted
Else:Conditional Branch: Hit6 is equal to Hit7, display message: You tied, no one wins
Else:
Conditional Branch: If Hit7 is greater than Hit6 you win
Else: You lose, your opponent got more than you
Message: you wanna play blackjack?
Show Choices: Yes/No
Yes: Set Variable "Hit1" to 0, Set Variable "Hit2" to 0... Set Variable "Hit5" to 0.
Set Variable Hit1 to a random number between 1-10
Message: You get a \v[x] (x equals the number of the variable Hit1 in the variable listings)
Show Choices:
Hit/Stay
Hit: Set Variable Hit2 to a random number between 1-10
Message: You get a \v[x]
(x now refers to the number for Hit2 in the variable listings)
Show Choices:
Hit/Stay
Hit: same as above, lather rinse repeat until you've hit for variable Hit5, in which case you automatically have to stay because you can only get five hits in blackjack
Stay (this should occur automatically after you get five cards as well, although it should always be a choice): Set Variable Hit6 to random number between 16-23
Set Variable Hit7 to Hit1+Hit2+Hit3+Hit4+Hit5
Message: You have a total of \v[x] (x now refers to the number in the variable listings for Hit7).
Message: Your opponent has a total of \v[x]
(x now refers to the number in the listings for Hit6)
Conditional Branch: If Hit7 is greater than 21 display Message: You lose, you busted
Else: Conditional Branch: If Hit6 is greater than 21, display message: you win, your opponent busted
Else:Conditional Branch: Hit6 is equal to Hit7, display message: You tied, no one wins
Else:
Conditional Branch: If Hit7 is greater than Hit6 you win
Else: You lose, your opponent got more than you