the-hobbes/softwareEngineeringFinalProject — pull request #13 by EJEHardenberg (2013-03-20 03:21:29+00:00)
Title: Model

The DDOS has apparently made github extremely silly.

In this pull request is the fix to the array issue we encountered today. The fix is detailed in the commit but here is a brief rundown.

in game.py
deck.append(subDeck) is the trouble maker

subDeck is a list, not a number. so we get something like this for deck:
[ 1 2 3 .... 3 5 [all the stuff in subdeck ]]

See the issue?

Lists need to be merged and flattened. They cannot be simply appended. While python allows this as it is a weakly typed language, this type of ambiguity in types within list is both a powerful tool, but also a huge pitfall if one is not careful. Just saying... this would never happen in C (unless you did some really stupid stuff)