This site requires JavaScript, please enable it in your browser!
Greenfoot back
largowinch123
largowinch123 wrote ...

2014/12/26

Card Game

largowinch123 largowinch123

2014/12/26

#
Hi, I need help. I have to do a card game. My problem is that I don't know how to do the deck, because I want that appears in the screen 1 by 1,with a division about 4 or 5 pixels. First I want that appears the cards back and then, when you click in the first card appears the head of the card (e.g. 4 of hearts). PD: Thank you, and my english is not good, so sorry about that.
danpost danpost

2014/12/27

#
'appear in the screen...with division...pixels' would be a world thing -- not a deck thing. 'appears the cards back...when you click...head of card' -- a card thing, not deck. A deck is a collection of cards. Beyond that, what else is there to say. A List object might be best suited for creating a deck so that the cards can be shuffled and placed into the world. The card should have 'flip', or behavior to show and hide by way of method(s). The world should create the collection of cards, shuffle them and add them where needed.
largowinch123 largowinch123

2014/12/27

#
Thank you, but I don't know how to do a List object because I still have not learned.
danpost danpost

2014/12/27

#
The Java tutorial page on The List Interface might be helpful (in more ways than one). You may as well want to check out the link at the bottom of the page for the 'Algorithms' page.
You need to login to post a reply.