From 0be47bd6def2ef86e6239567328b2985a1d728b1 Mon Sep 17 00:00:00 2001 From: sayebabu Date: Fri, 26 Jan 2024 15:44:50 +0100 Subject: [PATCH] a --- DEV4.1/tp1/modules/Ant.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/DEV4.1/tp1/modules/Ant.js b/DEV4.1/tp1/modules/Ant.js index 8e5fb40..49a3293 100644 --- a/DEV4.1/tp1/modules/Ant.js +++ b/DEV4.1/tp1/modules/Ant.js @@ -61,7 +61,14 @@ class Ant { computeNextState() { - // TODO + if (this.tiles == 0) { + this.rotateRight(); + this.tiles = 1; + } + else{ + this.rotateLeft(); + this.tiles = 0; + } } }