Board.java
/*
     * Description: method for condition when winning the game. Leaves 10 mines 
     * covered and draws a message telling the user they won the game and to press 
     * the 'r' key to reset the game. Also sets the won attribute of the game to 
     * true to change behavior of clickedCell().
     * Input: N/A, only called on a Board object.
     * Output: N/A, only changes attributes of different fields of the calling Board,
     * and draws using PennDraw, with no explicit outputs.
     */
method for condition when winning the game. Leaves 10 mines
covered and draws a message telling the user they won the game and to press
the 'r' key to reset the game. Also sets the won attribute of the game to
true to change behavior of clickedCell().
Input: N/A, only called on a Board object.
Output: N/A, only changes attributes of different fields of the calling Board,
and draws using PennDraw, with no explicit outputs.
method for condition when winning the game . Leaves 10 mines covered and draws a message telling the user they won the game and to press the ' r ' key to reset the game . Also sets the won attribute of the game to true to change behavior of clickedCell () . Input : N / A only called on a Board object . Output : N / A only changes attributes of different fields of the calling Board and draws using PennDraw with no explicit outputs .
public void win() {
        PennDraw.setPenColor(150, 150, 150);
        PennDraw.filledRectangle(4.5, 8.15, 2.6, .7);
        PennDraw.filledRectangle(4.5, 1.58, 2.75, .4);
        PennDraw.setPenColor(215, 215, 215);
        PennDraw.filledRectangle(4.5, 8.15, 2.5, .6);
        PennDraw.filledRectangle(4.5, 1.58, 2.7, .35);
        PennDraw.setPenColor(51, 194, 19);
        PennDraw.setFontSize(60);
        PennDraw.text(4.5, 8, "You Win!!");
        PennDraw.setPenColor(PennDraw.BLACK);
        PennDraw.setFontSize(32);
        PennDraw.text(4.5, 1.5, "Press r to Play Again");
        this.won = true;
    }
public void win ( ) { PennDraw . setPenColor ( 150 , 150 , 150 ) ; PennDraw . filledRectangle ( 4.5 , 8.15 , 2.6 , .7 ) ; PennDraw . filledRectangle ( 4.5 , 1.58 , 2.75 , .4 ) ; PennDraw . setPenColor ( 215 , 215 , 215 ) ; PennDraw . filledRectangle ( 4.5 , 8.15 , 2.5 , .6 ) ; PennDraw . filledRectangle ( 4.5 , 1.58 , 2.7 , .35 ) ; PennDraw . setPenColor ( 51 , 194 , 19 ) ; PennDraw . setFontSize ( 60 ) ; PennDraw . text ( 4.5 , 8 , "You Win!!" ) ; PennDraw . setPenColor ( PennDraw . BLACK ) ; PennDraw . setFontSize ( 32 ) ; PennDraw . text ( 4.5 , 1.5 , "Press r to Play Again" ) ; this . won = true ; }
Description: method for condition when winning the game.
Description : method for condition when winning the game .
// condition for what happens when winning the game
 // upper/bottom banner backgrounds
 // upper.bottom banner foregrounds
 // text for winning
 // win condition
