D.py simulates, or corresponds to, a game

changed D.py's code to more explicitly correspond to how the game would
be played by people so that the code is easier to reason about.