Create a game where a user is playing tag with 50 of your bitmojis. The bitmojis

Create a game where a user is playing tag with 50 of your bitmojis. The bitmojis “run” from the left of the canvas to the right at speeds that are either randomly 1 or 2.  The user, represented by a circle of diameter 20 controlled by the mouse, tries to tag them by clicking on them. When a bitmoji is tagged, it is out of the game. Bitmojis that reach the right edge, come back into the game on the left edge to try to get across the canvas again with a new random speed between 1 and 2 for its next run across the canvas.
Your program must use three arrays:
An array for the 50 bitmoji X positions, each of which is random between 50 and 350
An array for the 50 bitmoji Y positions, each of which is random between 50 and 350
An array for the 50 bitmoji speeds, each of which is randomly either 1 or 2.
Here is a suggested code outline:
var numBitmojis = 50;  //variable to set the number of bitmojis
var drawBitmoji = function (x,y,h)
{
// Your drawBitmoji function code
};
//Declare three arrays:one for the X,Y, and Speed of the bitmojis
//Use a for loop to fill the three arrays with random values
var draw = function()
{
//Background
//Draw the circle for the tagger that follows the mouse
/* for loop that for each of the 50 bitmojis:
* if the bitmoji has not been tagged:
* draw the bitmoji of height 50
* move the bitmoji using its speed
* if the bitmoji goes off the right side, then
* set its X to random between -40 and 40 to                   
restart left to right across the canvas
* set its speed to 1 or 2 randomly
*/
};
var mouseClicked = function()
{
/* for loop that for each of the 50 bitmojis:
* if the mouse circle of size 50 is over the bitmoji
* move the bitmoji off the screen (it is tagged)
*/
};

Posted in Uncategorized

Place this order or similar order and get an amazing discount. USE Discount code “GET20” for 20% discount