public double[][] form() {
        //muodostaa alkutilanteen mukaisen 2D-arrayn
        for (int i = 0; i < rows; i++) {
            for (int j = 0; j < columns; j++) {
                initialGrid[i][j] = tempInitial;
                if (i == 0) {
                    initialGrid[i][j] = tempUp;
                } else if (i == rows - 1) {
                    initialGrid[i][j] = tempDown;
                } else if (j == 0) {
                    initialGrid[i][j] = tempLeft;
                } else if (j == columns - 1) {
                    initialGrid[i][j] = tempRight;
                }
            }
        }
        return initialGrid;
    }