public void changeState(coord <int> pos, int state) { if (state >= (int)cell.Free && state < (int)cell.Exception) { matrix[pos.getX()][pos.getY()] = state; } }
public int getCellState(coord <int> pos) { int ans; try { ans = matrix[pos.getX()][pos.getY()]; } catch (Exception e) { ans = (int)cell.Exception; } return(ans); }