This is a simulation of the card game War. 1st phase was implemented ... players draw cards from main deck until there are no more cards there ... in the next phase the games starts with the temp decks that each player has. In this version, each player places a card on the table (from the main deck), if his card is bigger the player takes his card and the other's player card and puts in in a temp pile (each player has one) and vice versa. If the cards are the same a "war" is declared ...each player needs to place three more cards in a pile and if his 3rd card is bigger he wins the whole pile (8 cards in total = 1+1+3+3) ...
This simulation uses vars and lists ... a deck consists of 52 cards ... 1 - 13 .. each card can be one of the following H (Heart), C (Club), S (Spade) or D (Diamond) and either B (Black) or R (Red) e.g. 1SB = Ace Spade Black 13HR = King Heart Red This simulation was designed by Noam Koren