public LandMini AssignLandToEarthwatcher(int earthwatcherId, string basecamp, string geohexKey)
        {
            var land = GetFreeLand(basecamp, "'" + geohexKey + "'");

            if (land != null)
            {
                var landRepository = new LandRepository(connection.ConnectionString);
                landRepository.AssignLandToEarthwatcher(land.GeohexKey, earthwatcherId);
            }
            return(land);
        }
        public LandMini AssignLandToEarthwatcher(int earthwatcherId, string geohexKey)
        {
            var earthwatcher = GetEarthwatcher(earthwatcherId);

            var land = GetFreeLandByEarthwatcherIdAndPlayingRegion(earthwatcherId, earthwatcher.PlayingRegion);
            if (land != null)
            {
                var landRepository = new LandRepository(connection.ConnectionString);
                landRepository.AssignLandToEarthwatcher(land.GeohexKey, earthwatcherId, earthwatcher.PlayingRegion);
            }
            return land;
        }
Example #3
0
        public LandMini AssignLandToEarthwatcher(int earthwatcherId, string geohexKey)
        {
            var earthwatcher = GetEarthwatcher(earthwatcherId);

            var land = GetFreeLandByEarthwatcherIdAndPlayingRegion(earthwatcherId, earthwatcher.PlayingRegion);

            if (land != null)
            {
                var landRepository = new LandRepository(connection.ConnectionString);
                landRepository.AssignLandToEarthwatcher(land.GeohexKey, earthwatcherId, earthwatcher.PlayingRegion);
            }
            return(land);
        }
 public LandMini AssignLandToEarthwatcher(int earthwatcherId, string basecamp, string geohexKey) 
 {
     var land = GetFreeLand(basecamp, "'" + geohexKey + "'");
     if (land != null)
     {
         var landRepository = new LandRepository(connection.ConnectionString);
         landRepository.AssignLandToEarthwatcher(land.GeohexKey, earthwatcherId);
     }
     return land;
 }