create initial single-player version

First commit supports basic PHP session, and has all the game logic. Single player only.