refactored ui and logic communication
added basic game logic