Moved the algorithm to the Connection class, created GameState object -
not sure if it will be used in final implementation