Ejemplo n.º 1
0
Archivo: Map.cs Proyecto: sinshu/mafia
        public int this[Dim d]
        {
            get
            {
                int row = d.Row;
                int col = d.Col;
                if (row < 0 || numRows <= row || col < 0 || numCols <= col)
                {
                    return NONE;
                }
                return map[row, col];
            }

            set
            {
                int row = d.Row;
                int col = d.Col;
                if (row < 0 || numRows <= row || col < 0 || numCols <= col)
                {
                    return;
                }
                map[row, col] = value;
            }
        }
Ejemplo n.º 2
0
Archivo: Map.cs Proyecto: sinshu/mafia
 public bool IsObstacle(Dim d)
 {
     return this[d] != NONE;
 }