It is currently Mon Sep 24, 2018 8:53 am

All times are UTC - 7 hours

Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Sat Aug 25, 2007 1:17 am 

Joined: Sat Oct 02, 2004 12:07 pm
Posts: 163
I have been attempting to write a card game for the nes, and have been having quite the time figuring out a system of keeping the cards in order between two players. i think i have finally found a system that works for this game, though i would like to get some criticism and suggestions if possible. first of, i should state this game is a game of war.

basically, when the game starts out, it generates a deck of cards in random order based off the time it took the player to start the game from the title screen. this deck will then be divided and put in to two stacks of sorts, one for player 1 and one for player 2. and two variables indicating the card counts for both players will be set to 26.

when the players flip out their cards, the first card in the stack will be written to a variable, and the remaining cards still in the stack will be shifted one to the left... the cards will be compared and who ever has the higher card will have both cards added to the right side of the stack (end) and the card counts adjusted accordingly.

if the players both have the same card, and war occurs. both cards will be added to another stack for the waring cards. and a war card count will be created. then four cards will be pulled from each player, the fourth being saved in the current card variables, and all four cards from both players added to the end of the war card array. if players get the same cards this time, war will repeat adding on to the war array. once a player wins, all these cards will be added to the end of the winners stack, card counts will be adjusted.

that is what i am currently thinking is going to work, it is simple and easy to use. before when trying to figure out the best way to manage the cards, i kept making it to complicated and running in to problems, only to create a new problem after fixing each problem before it.

what i would like to see, is suggestions or other ways to keep track of these cards.

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 7 hours

Who is online

Users browsing this forum: zeroone and 3 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group