private void setMines() {
        int cellAmount = this.high * this.width;
        Random rand = new Random();
        int minesSet = this.minesNumber;
        while (minesSet > 0) {
            for (int iteration = 0; iteration < cellAmount && minesSet > 0; iteration++) {
                final int i = rand.nextInt(this.high);
                final int j = rand.nextInt(this.width);
                if (minesPerRow[i] == maxMinePerRow) continue;
                if (board[i][j].hasMine()) continue;

                if (putMine(minesSet)) {
                    board[i][j].setMine(new Mine() {
                        @Override
                        public void explode() {
                            board[i][j].notifyObservers("Exploded");
                        }
                    });
                    minesPerRow[i]++;
                    minesSet--;
                }
            }
            maxMinePerRow += 1;
        }
    }