Exemple #1
0
        private void GetBitmaps(HexInformation hexData, Dictionary <ResourceTypes, BitmapImage> resourceBitmaps, Dictionary <int, BitmapImage> numberBitmaps, out BitmapImage resourceBitmap, out BitmapImage numberBitmap)
        {
            if (!hexData.ResourceType.HasValue)
            {
                resourceBitmap = new BitmapImage(new Uri(@"resources\hextypes\desert.png", UriKind.Relative));
            }
            else
            {
                resourceBitmap = resourceBitmaps[hexData.ResourceType.Value];
            }

            numberBitmap = (hexData.ProductionFactor != 0 ? numberBitmaps[hexData.ProductionFactor] : null);
        }
Exemple #2
0
 private static byte CreateDataForProvider(HexInformation resourceProducer)
 {
     return((byte)((resourceProducer.ProductionFactor * 10) + TranslateProviderTypeToNumber(resourceProducer.ResourceType)));
 }