finished separating the GUI and the basic game logic