import java.awt.*;
import hsa.Console;
public class Portrait3
{
static Console c;
public static void main (String[] args)
{
Color LBrown = new Color (191, 104, 17); //Code for light brown colour
Color DBrown = new Color (140, 86, 6); //Code for dark brown colour
Color LBlue = new Color (147, 232, 235); //Code for light blue colour
Color Grey = new Color (153, 153, 153); //Code for grey colour
int faceColor, eyeShape, eyeColor, noseShape, noseColor;
String Eyeman;
c = new Console ();
//Face color
// c.println ("Would you like the shape of your face to be\n 1- round \n 2- square");
// faceShape = c.readInt ();
c.println ("Would you like the colour of your face to be\n 1- light brown \n 2- dark brown");
faceColor = c.readInt ();
c.clear ();
//Eyes shape & color
c.println ("Would you like the shape of your eyes to be\n 1- oval \n 2- circle");
eyeShape = c.readInt ();
c.println ("Would you like the colour of your eyes to be\n 1- blue \n 2- green");
eyeColor = c.readInt ();
/*
c.clear ();
//Nose shape & color
c.println ("Would you like the shape of your nose to be\n 1- circle \n 2- triangle");
noseShape = c.readInt ();
c.println ("Would you like the colour of your nose to be\n 1- yellow \n 2- blue");
noseColor = c.readInt ();
c.clear ();
*/
//If statements
//Face
if (faceColor == 1)
{
c.setColor (LBrown);
c.fillOval (100, 100, 400, 400);
}
else
{
c.setColor (DBrown);
c.fillOval (100, 100, 400, 400);
}
////////////////////////////////////////////////////
//Eyes
if (eyeShape == 1)
{
if (eyeColor == 1)
{
//Left Eye
c.setColor (LBlue);
c.fillOval (175, 185, 100, 60); //draw the left eye
c.setColor (Color.black); //change colour to black
c.fillOval (205, 200, 40, 40); //Draw the left eye balls
c.setColor (Color.white); //change colour to white
c.fillOval (217, 214, 15, 15); //smallest circle in the eye
//Right Eye
c.setColor (LBlue);
c.fillOval (320, 185, 100, 60); //draw the right eye
c.setColor (Color.black); //change colour to black
c.fillOval (350, 200, 40, 40); //draw the right eye balls
c.setColor (Color.white); //change colour to white
c.fillOval (362, 214, 15, 15); //draw the circle in the eye
}
else
{
//Left Eye
c.setColor (Color.green);
c.fillOval (175, 185, 100, 60); //draw the left eye
c.setColor (Color.black); //change colour to black
c.fillOval (205, 200, 40, 40); //Draw the left eye balls
c.setColor (Color.white); //change colour to white
c.fillOval (217, 214, 15, 15); //smallest circle in the eye
//Right Eye
c.setColor (Color.green);
c.fillOval (320, 185, 100, 60); //draw the right eye
c.setColor (Color.black); //change colour to black
c.fillOval (350, 200, 40, 40); //draw the right eye balls
c.setColor (Color.white); //change colour to white
c.fillOval (362, 214, 15, 15); //draw the circle in the eye
}
}
else if (eyeShape == 2)
{
if (eyeColor == 1)
{
//Left Eye
c.setColor (LBlue); //change colour to light blue
c.fillOval (185, 185, 80, 80); //draw the left eye
c.setColor (Color.black); //change colour to black
c.fillOval (205, 205, 40, 40); //Draw the left eye balls
c.setColor (Color.white); //change colour to white
c.fillOval (217, 219, 15, 15); //smallest circle in the eye
//Right Eye
c.setColor (LBlue); //change colour to light blue
c.fillOval (330, 185, 80, 80); //draw the right eye
c.setColor (Color.black); //change colour to black
c.fillOval (350, 205, 40, 40); //draw the right eye balls
c.setColor (Color.white); //change colour to white
c.fillOval (362, 219, 15, 15); //draw the circle in the eye
}
else
{
//Left Eye
c.setColor (Color.green); //change colour to green
c.fillOval (185, 185, 80, 80); //draw the left eye
c.setColor (Color.black); //change colour to black
c.fillOval (205, 205, 40, 40); //Draw the left eye balls
c.setColor (Color.white); //change colour to white
c.fillOval (217, 219, 15, 15); //smallest circle in the eye
//Right Eye
c.setColor (Color.green); //change colour to green
c.fillOval (330, 185, 80, 80); //draw the right eye
c.setColor (Color.black); //change colour to black
c.fillOval (350, 205, 40, 40); //draw the right eye balls
c.setColor (Color.white); //change colour to white
c.fillOval (362, 219, 15, 15); //draw the circle in the eye
}
}
////////////////////////////////////////////////////
/*
//Nose
c.setColor (Grey);
c.drawLine (290, 270, 260, 320);
c.drawLine (260, 320, 320, 320);
c.drawLine (290, 270, 320, 320);
for (int x = 290 ; x <= 320 ; x += 1)
for (int y = 270 ; y <= 320 ; y += 1)
*/
}
}