public IBoardBuilder BuildGoSpace() { IVisitableSpace goSpace = spaceFactory.CreateGoSpace(builtBoard); builtBoard.Add(goSpace); builtBoard.GoSpace = goSpace; return(this); }
public IBoardBuilder BuildJail() { IVisitableSpace jailSpace = spaceFactory.CreateJailSpace(builtBoard); builtBoard.Add(jailSpace); builtBoard.JailSpace = jailSpace; return(this); }
public IVisitableSpace CreateProperty(IBoard board, string id, string nameOfThePropertyToCreate) { IVisitableSpace newCreatedSpace = PropertyCreators[nameOfThePropertyToCreate](id, board); if (newCreatedSpace == null) { throw new ArgumentOutOfRangeException(nameOfThePropertyToCreate, "There is no information about this property in this factory."); } return(newCreatedSpace); }