added game logic and basic text version