From be4d267fcdeac3ad29e9055f0cdae4139cb9bee0 Mon Sep 17 00:00:00 2001
From: Matthias <vogtmatt@informatik.hu-berlin.de>
Date: Wed, 21 Aug 2019 20:36:22 +0200
Subject: [PATCH] fixed aua error, added notice that pong is not playable
 without a lidar :(

---
 index.html   | 2 +-
 js/Engine.js | 7 ++++---
 js/script.js | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/index.html b/index.html
index ea9cead..e539e9f 100644
--- a/index.html
+++ b/index.html
@@ -31,7 +31,7 @@
 
 
         <label>
-            <span>Pong mode</span>
+            <span>Pong mode; not playable :(</span>
             <input id="pong-mode" type="checkbox">
         </label>
 
diff --git a/js/Engine.js b/js/Engine.js
index ddac21b..1796331 100644
--- a/js/Engine.js
+++ b/js/Engine.js
@@ -326,9 +326,10 @@ export class Ball extends CollisionBox {
 		if (this.collisionPartners.some(partner => this.collidesWithFuture(partner))) {
 			// leide
 			// console.log("aua", this.$auas)
-			const $aua = this.$auas[Math.floor(this.$auas.length * Math.random())];
-			$aua.currentTime = 0;
-			$aua.play();
+			// const $aua = this.$auas[Math.floor(this.$auas.length * Math.random())];
+			// $aua.currentTime = 0;
+			// $aua.play();
+			console.log("aua")
 		}
 
 		this.spd = spdChangeMatrix.leftMultiplyV(this.spd);
diff --git a/js/script.js b/js/script.js
index 41d0a05..f9a6289 100644
--- a/js/script.js
+++ b/js/script.js
@@ -416,7 +416,7 @@ const ball = new Ball(
 	new Vector(5, 5)
 );
 
-ball.$auas = document.querySelectorAll(".aua");
+// ball.$auas = document.querySelectorAll(".aua");
 
 ball.collisionPartners = [...boundingBoxes, ...bats];
 ball.resetCollisionPartners = [boundingBoxes[0], boundingBoxes[0]];
-- 
GitLab