Game of War

3. Build Decks

Your first task is to build the actual deck. This is where all of the cards get split up from. Just think of taking a real deck of cards. You must name the list deck and it must contain an even number of 'cards'. Please put the deck on line 1 of your program.

Hint

deck = [1,2,3,4,1,2,3,4];

Now that you have your deck built, you need to build the usersHand and the pcHand. You are going to use the populateHand() function to do this!

The populateHand() function returns back a list. What that means is if your deck was populated with [1,2,3,4,5,6] the populateHand() function would return something like [3,6,2].
Hint

By the end of this section you should have 3 global variables. 1 named deck with an even number of 'cards' 1 named userHand that stores values passed back from populateHand() and finally 1 named pcHand that also is assigned what is returned from populateHand()

Next
Back