From ecd7d890c4da1a47b5791bc5561f67d8f1e252f6 Mon Sep 17 00:00:00 2001
From: Quentin CECCONI <quentin.cecconi@ensiie.fr>
Date: Mon, 19 Apr 2021 12:25:19 +0200
Subject: [PATCH] Replace arc_test.pde

---
 arc_test.pde | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/arc_test.pde b/arc_test.pde
index 5c4f7a9..59f97bf 100644
--- a/arc_test.pde
+++ b/arc_test.pde
@@ -1,5 +1,5 @@
 void setup(){
-  size(720,1080);
+  size(displayWidth,displayHeight);
   background(0,0,0);
   stroke(255,0,0);
   noFill();
@@ -22,16 +22,18 @@ void slash(float a,float b,float c,float d,color col,float offset,float lastcomp
 void mousePressed(){
   is_slash = true;
   comp = 0;
+  points = points + 1;
  
 }
 float comp = 0;
 float lastcomp = 0;
-float a = random(100,400);
-  float b = random(100,400);
-  float c = random(250,300);
-  float d = random(500,1000);
+float a = random(100,displayWidth);
+  float b = random(100,displayHeight);
+  float c = random(250,displayWidth);
+  float d = random(500,displayHeight);
   float offset = random(0,2*PI);
 boolean is_slash = false;
+int points = 0;
 void draw() {
   if (is_slash == true){
     
@@ -45,12 +47,13 @@ void draw() {
   comp = comp + PI/20;
   if (comp > PI){
     clear();
-    
+    textSize(32);
+  text("X"+str(points),100,100);
    
-     a = random(100,400);
-    b = random(100,400);
-    c = random(250,300);
-     d =random(500,1000);
+     a = random(100,displayWidth - displayWidth/10);
+    b = random(100,displayHeight - displayHeight/10);
+    c = random(250,displayWidth-displayHeight/5);
+     d =random(500,displayHeight-displayHeight/5);
      offset = random(0,2*PI);
      is_slash =false;
   comp = 0;}
-- 
GitLab