Fruit Ninjas! with mouse controls

Make a great game and let's play!

by Starsavior

HTML

<p id="text">Slice the fruits, not the bombs</p>
<canvas id="myCanvas" width="500" height="500" style="border:1px solid #000000;"></canvas>

CSS

#myCanvas {
    cursor:auto;
}

JavaScript

/**
Basic drawing variables
**/
var canvas = document.getElementById("myCanvas");
var context = canvas.getContext("2d");
//set initial gravity
var gravity = 0.4;
//fruit variables
var maxNumberOfFruits = 10; //how many fruits are possible on screen at one time?
var minFruitSize = 20; //smallest fruit possible
var maxFruitSize = 100; //largest fruit possible
var maxFruitSpeed = 20;
var bombInterval = 4;  //how many fruits show before bomb comes?
//game variables
var tries = 3; //how many fruit can fall before you fail?
////////////////////////////
//images for the game
///////////////////////////
//the sword
var sImg = new Image();
sImg.src = "http://s14.postimg.cc/rdtieaz3h/sword.png";
//the fruits
var fImg = new Image();
fImg.src = "http://s29.postimg.cc/5pasfffmf/fruit.png";
//the background
var bgImg = new Image();
bgImg.src = "http://s29.postimg.cc/a0476iz87/image.png";

/////////////////////////////////////
////////////////////////////////////
////////////////////////////////////
/**
mouse controls
**/
document.addEventListener("mousedown",function(e){
    //capture the event
    e = window.event || e;
    e.preventDefault();
    //tell the sword that it is cutting vvv
		
		/////////////////////////
});
document.addEventListener("mouseup",function(e){
    //capture the event
    e = window.event || e;
    //tell the sword that it is not cutting vvv
    
    ///////////////////////////
    //tell the game that it should start playing vvv
   
    //////////////////
});
document.addEventListener("mousemove",function(e){
    //capture the event
    e = window.event || e;
    //we use e.clinetX and e.clientY to track the mouse position
    //set the game's mouseX and mouseY to match the mouse position vvv
    
    
    ///////////////////////////////
    return true;
});
/////////////////////////////////////
/////////////////////////////////////
/////////////////////////////////////
/**
Defines the sword prototype
**/
function Sword() {
    this.x = 0;//set...