public void power(GameBoard gb, int x, int y) {
        invisible = getInvisible(gb);
        
        if(invisible > 4){
            invisible = 4;
        }
        for(int i = 0; i < invisible; i++){
            do{
                x = (int)(Math.random() * gb.getWidth());
                y = (int)(Math.random() * gb.getHeight());
            } while(gb.getSquare(x, y).isVisible() || gb.getSquareItem(x, y) == 
                    Item.MINE && gb.getSquareMarking(x, y) == Marking.FLAG);
            
            if(gb.getSquareItem(x, y) == Item.MINE){
                while(gb.getSquareMarking(x, y) != Marking.FLAG){
                    gb.markSquare(x, y);
                }
            } else {
                if(gb.getSquareMarking(x, y) == Marking.FLAG){
                    gb.markSquare(x, y);
                }
                gb.chooseSquare(x, y);
            }
        }
    }