From 5d5270b54ccc09f77e6fb77b06733e3e81e97d65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diana=20L=C3=B3pez=20Alvas?= Date: Wed, 2 Oct 2024 16:41:18 -0300 Subject: [PATCH 1/2] adding border sensors on actor --- src/actores/ActorAnimado.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/actores/ActorAnimado.ts b/src/actores/ActorAnimado.ts index 21bb7a3..9c550c1 100644 --- a/src/actores/ActorAnimado.ts +++ b/src/actores/ActorAnimado.ts @@ -175,6 +175,22 @@ class ActorAnimado extends Actor { return !this.casillaActual().hayAbajo() && !this.casillaActual().hayDerecha(); } + enBordeArriba(): boolean { + return !this.casillaActual().hayArriba() + } + + enBordeAbajo(): boolean { + return !this.casillaActual().hayAbajo() + } + + enBordeIzquierdo(): boolean { + return !this.casillaActual().hayIzquierda() + } + + enBordeDerecho(): boolean { + return !this.casillaActual().hayDerecha() + } + estoyUltimaFila(): boolean { return this.cuadricula.cantFilas - 1 == this.casillaActual().nroFila; } From dd4ef4f3f70ca12a6292f16bb58555166d47793c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diana=20L=C3=B3pez=20Alvas?= Date: Wed, 2 Oct 2024 16:43:30 -0300 Subject: [PATCH 2/2] 1.4.34 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 40449c9..ecf05ad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "pilas-bloques-exercises", - "version": "1.4.33", + "version": "1.4.34", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 7d36f30..4b8b69d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pilas-bloques-exercises", - "version": "1.4.33", + "version": "1.4.34", "description": "Exercises for Pilas Bloques", "homepage": "http://pilasbloques.program.ar", "author": {