xxxxxxxxxx
23
function setup() {
// createCanvas(400, 400);
createCanvas(windowWidth, windowHeight);
}
var player1 = 0;
var player2 = 0;
function draw() {
background(220);
stroke(255,0,105);
line(width/2, 0, width/2, height);
textSize(24);
text(player1, 50, 50);
text(player2, width-50, 50);
}
function mouseClicked()
{
if (mouseX < width/2) player1++;
else player2++;
}