Implemented game logic

Looks like all we need from here is the UI manipulation