Card game war, programming related-ish

This is a discussion on Card game war, programming related-ish within the Tech Board forums, part of the Community Boards category; If you were to play the card game of war with only 4 cards total, and each player received two ...

  1. #1
    Registered User
    Join Date
    Nov 2011
    Posts
    1

    Card game war, programming related-ish

    If you were to play the card game of war with only 4 cards total, and each player received two cards each to begin with, under which circumstances would the game go on forever?

  2. #2
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,738
    All four cards being the same rank.

  3. #3
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,074
    Also, if I recall the rules of war, you'd have a problem if you had two pair of different ranked cards and the initial distribution gave one to each rank to each player. The only way to capture the highest ranked cards to be captured is face down in a war when they're not used. A scenario that couldn't occur with 2 cards each, so the war would always guarantee that a war ends in another war between the other cards. I don't know what happens in a game of war when both players have no cards left to play, but if you assume the game doesn't end in a tie the only reasonable solution would be that each player takes their cards back and shuffles. (Anyway the result is no different than all four cards be the same rank in this case).

    There is no way to capture the highest ranked card and since capturing the lower ranked card forces your higher ranked card to the bottom of the deck, it guarantees that the next round would leave you pitting your lower ranked card against their higher ranked card just offsetting the whole thing.

    Of course I did just wake up, so I could be missing something... and you know I must be drowsy if I'm forgetting a permutation of four items! O_O
    Last edited by SlyMaelstrom; 11-10-2011 at 07:29 AM.
    Sent from my iPadŽ

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Card game war
    By Dr Saucie in forum C Programming
    Replies: 3
    Last Post: 02-11-2010, 10:25 PM
  2. Just want some clarification on some game related things
    By Rumproast23 in forum Game Programming
    Replies: 5
    Last Post: 06-02-2006, 07:08 AM
  3. Card game help
    By aaroroge in forum Game Programming
    Replies: 9
    Last Post: 07-16-2005, 06:37 PM
  4. card game
    By rugger78 in forum C++ Programming
    Replies: 4
    Last Post: 12-07-2004, 03:50 PM
  5. related to game programming but it isn't
    By Scourfish in forum Game Programming
    Replies: 6
    Last Post: 09-08-2001, 05:03 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21