private void initField(Field[][] fields) {
        for (int i = 0; i < sizeX; i++) {
            for (int j = 0; j < sizeY; j++) {
                fields[i][j] = new Field(this, i + j * sizeX);
            }
        }
        for (int i = 0; i < sizeX; i++) {
            fields[i][0] = new BorderField(fields[i][0]);
        }
        for (int i = 0; i < sizeX; i++) {
            fields[i][sizeY - 1] = new BorderField(fields[i][sizeY - 1]);
        }
        for (int j = 0; j < sizeY; j++) {
            fields[0][j] = new BorderField(fields[0][j]);
        }
        for (int j = 0; j < sizeY; j++) {
            fields[sizeX - 1][j] = new BorderField(fields[sizeX - 1][j]);
        }
    }