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