コード例 #1
0
 public CellModel(CellContentEnum cellContent)
 {
     this.CellContent    = cellContent;
     this.CurrentReward0 = 0.0;
     this.CurrentReward1 = 0.0;
     this.CurrentReward2 = 0.0;
     this.CurrentReward3 = 0.0;
 }
コード例 #2
0
        private void SetBackgroundBasedOnContent(Rectangle rectangle, CellContentEnum cellContentEnum)
        {
            switch (cellContentEnum)
            {
            case CellContentEnum.Exit:
                rectangle.Fill = Brushes.Aqua;
                break;

            case CellContentEnum.Free:
                rectangle.Fill = Brushes.White;
                break;

            case CellContentEnum.Wall:
                rectangle.Fill = new SolidColorBrush(Color.FromRgb(40, 40, 40));
                break;

            case CellContentEnum.Agent:
                rectangle.Fill = Brushes.IndianRed;     //new SolidColorBrush(Color.FromArgb(128, 0xcd, 0x5c, 0x5c));
                break;
            }
        }