diff --git a/webdev/web/game.js b/webdev/web/game.js index b33f57c..eb3c7a1 100644 --- a/webdev/web/game.js +++ b/webdev/web/game.js @@ -1,3 +1,17 @@ +let Playerposx = 500; +let Playerposy = 300; + +if (booleanArray) { + if (booleanArray[1]) { + Playerposx += 1;} + if (booleanArray[3]) { + Playerposx -= 1;} + if (booleanArray[0]) { + Playerposy += 1;} + if (booleanArray[2]) { + Playerposy -= 1;} + +} // the function setup() is called once when the page is loaded function setup(){ @@ -14,5 +28,5 @@ function draw(){ background(0,0,0,10); // draw a circle at the mouse position - circle(mouseX, mouseY, 50); + circle(Playerposx, Playerposy, 50); } \ No newline at end of file