basic working version

missing new game functions but basically working