First I made a routine to lay out the first 28 cards out from the randomized deck in a pyramid, starting with the top card. Then I created a simple cursor routine to jump between the cards in a diamond direction pattern using the ASZX keys. It just checks that it doesn't jump off into the cyan border area around the cards. As part of that routine I took note of the card value of the current card highlighted by the cursor. Hitting (Enter) would select and reverse video that value and then allow you to move again to select another card, or simply choose from the deck (D) or from the wast pile (W). Pressing (C) would cycle the cards from the deck to the waste pile for a max of three cycles.
The biggest challenge was creating a refresh routine for the pyramid that would recreate the proper illusion of the cards lying on top of each other with some being only partially revealed as they alternate from top to bottom. In the end it was simplest just to blank the removed cards and then refresh the pyramid from top to bottom and the top of the piles, but leaving out removed cards.
The whole process took surprisingly little time. I am getting proficient creating simple card games. Don't know what to try next, but if anyone out there has any ideas of card games they would like brought to the MC-10, or Coco, just let know. Here's what the final product looked like:
No comments:
Post a Comment