Create memory.py

I got the turn count wrong. But I will post it anyway, then come back later and try to fix it. Maybe as simple as dividing by 2, but I haven't looked at it yet.