Create Pacman with functions and parameters

Now that we’ve learned about variables and functions, we can start having more fun!

Your task today is to create and save your own version of Pacman, by changing the parameters on a pacman() function in the code below:

Use this code – you can copy it from here

//Can you change the appearance of pacman by changing the parameters on this function?
float x; //this sets the centre of pacman in the x axis
float y; //this sets the centre of pacman in the y axis
color pink = color(255,134,241); //do you want to draw a pink pacman?
color yellow = color(0,125,125); //or a yellow one?
//set the radius variable for the pacman character
float radius = 55; //decide how big you want your pacman to be
//boolean variable to set the sex of the pacman character
Boolean female = true;
int direction = 0;

void setup()
{
size(100,100);
//set initial values for the pacman coordinates
x=width/2;
//set y position of pacman
y=height/2;
} //this ends the setup() function

//the draw() function runs many times per second - useful for animations
void draw()
{
smooth();
//draw background
background(0);

//change the parameters in this function to draw your own pacman
//see what happens if you don't set one of the parameters
pacman(x, y, pink, true, radius, direction);
//Can you put in a couple of extra pacman() functions here, with different paramenters?
} //This ends the draw() function

//next we need the pacman() function - you can see that all the parameters are defined in the first line
//see what happens if you delete one of the functions
void pacman(float tempX, float tempY, color clr, Boolean tempFemale, float tempRadius, int tempDir)
{
fill(clr);
noStroke();

if (tempDir==0)
{
//draw pacman facing right
}
else
{
//draw pacman facing left
}
//draw eyes
fill(0);
if (tempFemale == true)
{
//draw ribbon for ms pacman
fill(255, 0, 0, 200);