Python Game Tree implementation