コード例 #1
0
ファイル: Minefield.cs プロジェクト: afcarl/SI-saper
 public void addField(int x, int y, Frame.FieldType type)
 {
     if (!(x < 0 || x >= Settings.MAP_SIZE || y < 0 || y >= Settings.MAP_SIZE || fieldArray[x, y] != null))
     {
         fieldArray[x, y] = new Field(type);
     }
 }
コード例 #2
0
 public Field(Frame.FieldType fieldType)
 {
     this.explosive = null;
     this.mineDepth = 0.0;
     this.type      = fieldType;
     if (this.type == Frame.FieldType.Scrap)
     {
         scrapImage             = new Image();
         this.scrapImage.Source = new BitmapImage(new Uri(@"pack://application:,,,/res/scrap.jpg"));
     }
 }