Esempio n. 1
0
 public CharacterCanOnlyHaveOneLocation(
     ISingleLocationPerCharacterChecker singleLocationPerCharacterChecker,
     Guid character)
 {
     _singleLocationPerCharacterChecker = singleLocationPerCharacterChecker;
     _character = character;
 }
 public SpawnCharacterCommandHandler(
     ICharacterLocationRepository characterLocationRepository,
     ISingleLocationPerCharacterChecker singleLocationPerCharacterChecker,
     IUnitOfWork unitOfWork)
 {
     _characterLocationRepository       = characterLocationRepository;
     _singleLocationPerCharacterChecker = singleLocationPerCharacterChecker;
     _unitOfWork = unitOfWork;
 }
Esempio n. 3
0
        public static CharacterLocation Create(Guid characterId, int x, int y, ISingleLocationPerCharacterChecker singleLocationPerCharacterChecker)
        {
            CheckRule(new CharacterCanOnlyHaveOneLocation(singleLocationPerCharacterChecker, characterId));

            return(new CharacterLocation(characterId, x, y));
        }