示例#1
0
        public void CreateRegion(IBatchOperationHandle batchOperationHandleInterface, Guid sessionId, Guid regionId, Guid continentId, String name, IEnumerable <Guid> connectedRegions, UInt32 cardValue)
        {
            DummyBatchOperationHandle batchOperationHandle = batchOperationHandleInterface as DummyBatchOperationHandle;

            batchOperationHandle.QueuedOperations.Add(() =>
            {
                RegionData[regionId] = new DummyRegionData(sessionId, regionId, continentId, String.Empty, cardValue);
                foreach (Guid connectedRegion in connectedRegions)
                {
                    RegionData[regionId].ConnectedRegionIds.Add(connectedRegion);
                }
            });
            batchOperationHandle.QueuedOperations.Add(() =>
            {
                CardData[regionId] = new DummyCardData(regionId, cardValue);
            });
        }
示例#2
0
 public DummyRegionData SetupRegion(Guid sessionId, Guid regionId, Guid continentId, String initialOwner, UInt32 cardValue)
 {
     RegionData[regionId] = new DummyRegionData(sessionId, regionId, continentId, initialOwner, cardValue);
     CardData[regionId]   = new DummyCardData(regionId, cardValue);
     return(RegionData[regionId]);
 }