Exemple #1
0
        public IBoardBuilder BuildGoSpace()
        {
            IVisitableSpace goSpace = spaceFactory.CreateGoSpace(builtBoard);

            builtBoard.Add(goSpace);
            builtBoard.GoSpace = goSpace;
            return(this);
        }
Exemple #2
0
        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);
        }