Added logic to gameplay. Still needs to be connected to the GUI and
tested.