In Order To Use the Java based drawing functions:

 
·                unzip the file java_draw.zip into your work subdirectory (or some other folder in your search path)
 
·                when you are programming, make sure to call function “initWindow” first.
 
·                 At any time in your script, you can call the function “putPixel(<x>, <y>, g)” to put a pixel at coordinates (x,y).
 
·                 Example:
 
               initWindow;
               putPixel(100, 100, g);
 
·                 If you resize your window or if another window gets located on its top, your drawings will get lost. Before you call your program, make sure the drawing pad is completely visible and not hidden behind other windows.
 
·                Don’t worry about the “,g” part, you will see why you need it later. 
 
·                There is a default color that is used for functions that doesn’t take color arguments like putPixel, drawLine, drawPolygon.
 
·                You can change the default color using the function changeColor.
 
 
·                All colors are represented by their red, green and blue components that takes on values between 0 and 1. For example, changeColor(0.5, 0, 0) changes the color to half-dark red, whereas changeColor(0, 1, 0) changes the default color to pure green.
 
·                Functions putColor and drawColorLine are colored versions of putPixel and drawLine respectively. They take on three extra parameters for the components of their color. They also have a side affect of changing the default color to their argument.

·        You can check the existence of mines by the function checkMine.m