Implements the base code of the different type of games