Cell.java
/*
     * Description: function that draws calling cells according to their covered or 
     * uncovered state, so that there is a noticeable difference between covered
     * and uncovered cells. Drawing style is similar to actual MineSweeper game.
     * Cells that are uncovered have the number of adjacent bombs drawn on them, and
     * if a bomb is uncovered, a red "B" is drawn.
     * Input: N/A, takes in no inputs, just called on a cell.
     * Output: N/A, only uses PennDraw functions to draw cell, nothing returned.
     */
function that draws calling cells according to their covered or
uncovered state, so that there is a noticeable difference between covered
and uncovered cells. Drawing style is similar to actual MineSweeper game.
Cells that are uncovered have the number of adjacent bombs drawn on them, and
if a bomb is uncovered, a red "B" is drawn.
Input: N/A, takes in no inputs, just called on a cell.
Output: N/A, only uses PennDraw functions to draw cell, nothing returned.
function that draws calling cells according to their covered or uncovered state so that there is a noticeable difference between covered and uncovered cells . Drawing style is similar to actual MineSweeper game . Cells that are uncovered have the number of adjacent bombs drawn on them and if a bomb is uncovered a red " B " is drawn . Input : N / A takes in no inputs just called on a cell . Output : N / A only uses PennDraw functions to draw cell nothing returned .
public void draw() {
        if (this.coveredGet() == true) {
            PennDraw.setPenColor(150, 150, 150);
            PennDraw.filledPolygon(x, y, x + 1, y, x + 1, y + 1);
            PennDraw.setPenColor(PennDraw.WHITE);
            PennDraw.filledPolygon(x, y, x, y + 1, x + 1, y + 1);
            PennDraw.setPenColor(215, 215, 215);
            PennDraw.filledSquare(0.5 + x, 0.5 + y, 0.41);
        }
        else if (this.coveredGet() == false) {
            PennDraw.setPenColor(215, 215, 215);
            PennDraw.filledSquare(0.5 + x, 0.5 + y, 0.475);
            PennDraw.setFontSize(48);
            PennDraw.setPenColor(PennDraw.BLACK);
            if (this.numberGet() < 9 && this.numberGet() > 0) {
                PennDraw.text(0.5 + x, 0.39 + y, "" + this.number);
            }
            else if (this.mineGet() == true) {
                PennDraw.setPenColor(PennDraw.RED);
                PennDraw.text(0.5 + x, 0.39 + y, "B");
            }
        }
    }
public void draw ( ) { if ( this . coveredGet ( ) == true ) { PennDraw . setPenColor ( 150 , 150 , 150 ) ; PennDraw . filledPolygon ( x , y , x + 1 , y , x + 1 , y + 1 ) ; PennDraw . setPenColor ( PennDraw . WHITE ) ; PennDraw . filledPolygon ( x , y , x , y + 1 , x + 1 , y + 1 ) ; PennDraw . setPenColor ( 215 , 215 , 215 ) ; PennDraw . filledSquare ( 0.5 + x , 0.5 + y , 0.41 ) ; } else if ( this . coveredGet ( ) == false ) { PennDraw . setPenColor ( 215 , 215 , 215 ) ; PennDraw . filledSquare ( 0.5 + x , 0.5 + y , 0.475 ) ; PennDraw . setFontSize ( 48 ) ; PennDraw . setPenColor ( PennDraw . BLACK ) ; if ( this . numberGet ( ) < 9 && this . numberGet ( ) > 0 ) { PennDraw . text ( 0.5 + x , 0.39 + y , "" + this . number ) ; } else if ( this . mineGet ( ) == true ) { PennDraw . setPenColor ( PennDraw . RED ) ; PennDraw . text ( 0.5 + x , 0.39 + y , "B" ) ; } } }
Description: function that draws calling cells according to their covered or
 uncovered state, so that there is a noticeable difference between covered
 and uncovered cells.
Description : function that draws calling cells according to their covered or uncovered state so that there is a noticeable difference between covered and uncovered cells .
// covering of cell drawing
 // background of cell drawing
 // cell number drawing
 // bomb drawing
