Popular recipes tagged "automatically" and "simulation"http://code.activestate.com/recipes/tags/automatically+simulation/2012-07-01T01:23:03-07:00ActiveState Code RecipesWar Card Game Simulation (Python)
2012-07-01T01:23:03-07:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/578179-war-card-game-simulation/
<p style="color: grey">
Python
recipe 578179
by <a href="/recipes/users/2608421/">Stephen Chappell</a>
(<a href="/recipes/tags/automatically/">automatically</a>, <a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/simulation/">simulation</a>).
</p>
<p>After playing the card game with people for the first time, the game turned out to be rather boring. The way we played took absolutely no thought whatsoever and turned out to be very easy to automate. The game below is configured for four different players to complete the simple game until it ends. Each player's hand in printed, and the cards played in each round is shown till someone finishes. Whoever wins is shown at the end of the simulation, and the program quickly exits when complete.</p>