예제 #1
0
 public void changeState(coord <int> pos, int state)
 {
     if (state >= (int)cell.Free && state < (int)cell.Exception)
     {
         matrix[pos.getX()][pos.getY()] = state;
     }
 }
예제 #2
0
        public int getCellState(coord <int> pos)
        {
            int ans;

            try
            {
                ans = matrix[pos.getX()][pos.getY()];
            }
            catch (Exception e)
            {
                ans = (int)cell.Exception;
            }
            return(ans);
        }