Go Back   Winamp Forums > Community Center > General Discussions

Reply
Thread Tools Search this Thread Display Modes
Old 22nd August 2002, 07:45   #1
whiteflip
Post Master General
(Forum King)
 
whiteflip's Avatar
 
Join Date: Jun 2000
Location: Seattle, Now Las Vegas
Posts: 6,032
Javascript Blackjack Help

I am going to make a black jack game that offers dealers in Javascript

What i need is tips on how to make the black jack engine

You start out with 1000 dollars and choose the bet ammount. and earn money and stuff. Straight black jacks earn 1.5 X your bet. How should i implement the double down system? and splitting! Splitting seems to be the hardest part of the game.

I'm Back?
whiteflip is offline   Reply With Quote
Old 22nd August 2002, 08:22   #2
ctn|chrisw
Forum King
 
ctn|chrisw's Avatar
 
Join Date: Mar 2002
Location: Hell
Posts: 3,309
What? me not understand...I better start reading that javascript for dummies book I got 2 years ago


ctn|chrisw is offline   Reply With Quote
Old 22nd August 2002, 10:19   #3
whiteflip
Post Master General
(Forum King)
 
whiteflip's Avatar
 
Join Date: Jun 2000
Location: Seattle, Now Las Vegas
Posts: 6,032
what i got so far
code:

function loadValues(){
cash = 1000
blackjackGirls = new Array("girls/alpha.jpg",.....
faces = new Array("2","3","4","5","6","7","8","9",
"10","J","Q","K","A")
suits = new Array("Clubs","Diamonds","Hearts","Spades")
document.writeln('cash: ')
document.writeln(cash)
}

window.document.onload = loadValues()

function deal(){
for (randCard=0; randCard < 13; randCard++){
card1 = Math.round(Math.random()*randCard)
card2 = Math.round(Math.random()*randCard)
}
card1face = faces[card1]
card1value = card1 + 2
if (card1value >= 11 && card1value <= 13){
card1value = 10
}
if (card1value == 14){
card1value == 11
}

card2face = faces[card2]
card2value = card2 + 2
if (card2value >= 11 && card2value <= 13){
card2value = 10
}
if (card2value == 14){
card2value == 11
}
document.writeln('<br><br>card1: ' + card1)
document.writeln('<br>card1face: ' + card1face)
document.writeln('<br>card1value: ' + card1value)
document.writeln('<br><br>card2: ' + card2)
document.writeln('<br>card2face: ' + card2face)
document.writeln('<br>card2value: ' + card2value)
}

deal()


not much at all. when im done ill post my simple blackjack game for everyone to use. it will have pictures of cards instead of numbers and it will have a dealer.

I'm Back?
whiteflip is offline   Reply With Quote
Old 22nd August 2002, 14:03   #4
Curi0us_George
Forum King
 
Curi0us_George's Avatar
 
Join Date: Apr 2001
Location: Oxford, MS Posts: -1
Posts: 5,179
Send a message via AIM to Curi0us_George Send a message via Yahoo to Curi0us_George
Brainjar.com has a Javascript Card Object tutorial. It could be useful for your purposes. It's also got a fully working blackjack table, so you probably want to steer clear of that section, unless you are wanting to plagiarize someone else's code.

For the freedom to express myself in my own way without fear of being censored or banned.

47 65 6C 61 65 64 2E 63 6F 6D 00
Curi0us_George is offline   Reply With Quote
Old 22nd August 2002, 14:55   #5
whiteflip
Post Master General
(Forum King)
 
whiteflip's Avatar
 
Join Date: Jun 2000
Location: Seattle, Now Las Vegas
Posts: 6,032
so if i get stuck i cant look at his code for help i have to write my own? can i play his blackjack game?

ty for the link

I'm Back?
whiteflip is offline   Reply With Quote
Old 22nd August 2002, 14:59   #6
whiteflip
Post Master General
(Forum King)
 
whiteflip's Avatar
 
Join Date: Jun 2000
Location: Seattle, Now Las Vegas
Posts: 6,032

his cards are made in DOM
he has an insurance pop up alert thinggy
its pretty
its got split. i have no idea how to implement split

hes really good.

computer science 101's extra credit project is to make blackjack. of course its C++ not javascript...

I'm Back?
whiteflip is offline   Reply With Quote
Old 22nd August 2002, 15:43   #7
Curi0us_George
Forum King
 
Curi0us_George's Avatar
 
Join Date: Apr 2001
Location: Oxford, MS Posts: -1
Posts: 5,179
Send a message via AIM to Curi0us_George Send a message via Yahoo to Curi0us_George
Yup. He's quite "bad-assed", as one might say.

For the freedom to express myself in my own way without fear of being censored or banned.

47 65 6C 61 65 64 2E 63 6F 6D 00
Curi0us_George is offline   Reply With Quote
Old 22nd August 2002, 18:33   #8
whiteflip
Post Master General
(Forum King)
 
whiteflip's Avatar
 
Join Date: Jun 2000
Location: Seattle, Now Las Vegas
Posts: 6,032
the javascript game im making is my second javascript project.....
maybe i shoulda acumulated more experience.

although it will take a long time to make and debug its gonna have a feature that brainjar's doesnt.

stripping dealers

simple, the more money you make the less they have,,, on... kinda like strip poker. i couldnt find a decent strip blackjack game to play so im making one. anyone else wanna play it when im done?

I'm Back?
whiteflip is offline   Reply With Quote
Old 22nd August 2002, 18:35   #9
whiteflip
Post Master General
(Forum King)
 
whiteflip's Avatar
 
Join Date: Jun 2000
Location: Seattle, Now Las Vegas
Posts: 6,032
forgot...
Attached Files
File Type: zip blackjack.zip (10.7 KB, 39 views)

I'm Back?
whiteflip is offline   Reply With Quote
Old 22nd August 2002, 18:45   #10
squell
Banned
 
squell's Avatar
 
Join Date: Aug 2002
Location: The Island Closest To Heaven
Posts: 713
Send a message via AIM to squell Send a message via Yahoo to squell
woo hoo, i'll definately want to play it. naked people! woo! what's in the attachment?
squell is offline   Reply With Quote
Old 22nd August 2002, 21:19   #11
whiteflip
Post Master General
(Forum King)
 
whiteflip's Avatar
 
Join Date: Jun 2000
Location: Seattle, Now Las Vegas
Posts: 6,032
Quote:
Originally posted by squell
woo hoo, i'll definately want to play it. naked people! woo! what's in the attachment?
my ass hurts form all the sitting and coding. and im using the comfortable chair!

new attachment. its the black jack game without the black jack or nakid ness. blackjack functionality will be implemented during the right now phase and nakedness will be during the last part phase.

people who are savvy take a look at the script file and html file and css file and tell me what would be better than what i came up with.

I'm Back?
whiteflip is offline   Reply With Quote
Old 22nd August 2002, 21:21   #12
whiteflip
Post Master General
(Forum King)
 
whiteflip's Avatar
 
Join Date: Jun 2000
Location: Seattle, Now Las Vegas
Posts: 6,032
they should let you attach files from edit

its a very limted black jack. you cant choose the number of decks or shuffle frequency. thats preminantly set too 9 decks and shuffles every time. you can only hit up to 5 cards. if you get 5 cards im thinking of implemening the 5 card win rule
splitting is gonna be damn hard to do. i need help there.
Attached Files
File Type: zip blackjack.zip (11.8 KB, 35 views)

I'm Back?
whiteflip is offline   Reply With Quote
Old 22nd August 2002, 21:55   #13
squell
Banned
 
squell's Avatar
 
Join Date: Aug 2002
Location: The Island Closest To Heaven
Posts: 713
Send a message via AIM to squell Send a message via Yahoo to squell
looking good so far.
squell is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Community Center > General Discussions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump