finished implementation of the agent class, impelemented the gameMaster function