Alice Community  

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

Reply
 
Thread Tools Display Modes
Making Card Game
Old
cremsin
Junior Member
 
Status: Offline
Posts: 2
Join Date: Nov 2011
Location: Sumter
Default Making Card Game - 11-09-2011, 01:51 AM

I am working on a final project for school and it is to make a card game that the user can input the number of players 1 - 5 and the number of cards dealt 1 -5 . We have to keep up with the cards that are dealt because we have to have a shuffle button that resets the deck of 52 cards.

I have imported 52 billboard cards to a list. I have to deal a random card based on how many players and cards to deal. What I need to know is when I deal a random card from a list, how can I keep track of it so that A. it dosnt get dealt again *that happens sometimes* and B. So I can call them all back into the deck no matter where they are.

I am not a programmer, Im a network guy, but you have to have programming for the degree and I am struggling lol. I have the rest of the program written, and working like it is supposed to. it is just the tracking the cards, and making them to where they can not be dealt again.

I was thinking it would work if i could move them to another list when they are dealt (they have to remain visible though), but I do not know how to move a random item from one list to the another.

Thanks for the help in advance.
   
Reply With Quote
Old
jnawrocki
Member
 
Status: Offline
Posts: 32
Join Date: Jan 2010
Location: Toledo, OH
Default 11-14-2011, 05:44 PM

Please view the attached world. (My world contains only 5 cards but the logic can be applied to a 52 card list.) It addresses your problems of duplicate cards and recalling all cards. The code is well documented, but if you have questions, let me know.

Hope this helps.
Attached Files
File Type: a2w CardGame.a2w (1.33 MB, 75 views)
   
Reply With Quote
Old
cremsin
Junior Member
 
Status: Offline
Posts: 2
Join Date: Nov 2011
Location: Sumter
Default 11-14-2011, 06:22 PM

Thank You !! And my class thanks you none of us could figure it out.
   
Reply With Quote
Reply

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 ©2021, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.