PennDraw.java
/**
     * Clear the screen to the given color.
     * @param red the amount of red (between 0 and 255)
     * @param green the amount of green (between 0 and 255)
     * @param blue the amount of blue (between 0 and 255)
     * @param alpha the amount of alpha (between 0 and 255)
     * @throws IllegalArgumentException if the amount of red, green, or blue are outside prescribed range
     */
Clear the screen to the given color.
Clear the screen to the given color .
public static void clear(int red, int green, int blue, int alpha) {
        if (red   < 0 || red   >= 256) throw new IllegalArgumentException("amount of red must be between 0 and 255");
        if (green < 0 || green >= 256) throw new IllegalArgumentException("amount of green must be between 0 and 255");
        if (blue  < 0 || blue  >= 256) throw new IllegalArgumentException("amount of blue must be between 0 and 255");
        if (alpha < 0 || alpha >= 256) throw new IllegalArgumentException("amount of alpha must be between 0 and 255");
        clear(new Color(red, green, blue, alpha));
    }
public static void clear ( int red , int green , int blue , int alpha ) { if ( red < 0 || red >= 256 ) throw new IllegalArgumentException ( "amount of red must be between 0 and 255" ) ; if ( green < 0 || green >= 256 ) throw new IllegalArgumentException ( "amount of green must be between 0 and 255" ) ; if ( blue < 0 || blue >= 256 ) throw new IllegalArgumentException ( "amount of blue must be between 0 and 255" ) ; if ( alpha < 0 || alpha >= 256 ) throw new IllegalArgumentException ( "amount of alpha must be between 0 and 255" ) ; clear ( new Color ( red , green , blue , alpha ) ) ; }
Clear the screen to the given color.
Clear the screen to the given color .