Initial game loop implemented. Need to be tested.