Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Blackjack
Old
OddOstrich
Junior Member
 
Status: Offline
Posts: 2
Join Date: May 2014
Default Blackjack - 05-11-2014, 09:41 PM

Ignore the blurry image, here's a link to the image: http://i.imgur.com/5hJuG7M.png

I am trying to make an interactive Blackjack game in Alice 3.

The top picture shows the code that is able to deal cards to the two players, however it cannot identify the value of each cards.

In the bottom picture, I try to fix this by putting each set of cards into different arrays, but can't find a way to put all the arrays into another array so I could just use that array to deal...

I also am having trouble understanding how the eventlisteners work. I added an event that states if H is pressed to run the procedure called "hitMe" which will deal a new card to the next thingMarker. However, the variables keep resetting every time H is pressed so the cards keep moving to the same thingMarker.

My questions:
Is there anyway to put an array of objects(Billboards) into an array of whole numbers?
How can I assign numerical values to objects?
Is there a way to assign global variables?
Attached Images
File Type: jpg blackjack.jpg (12.0 KB, 17 views)

Last edited by OddOstrich; 05-12-2014 at 03:30 PM.
   
Reply With Quote
 

Thread Tools
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



Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.