Skip to content

Commit

Permalink
Merge pull request #70 from Program-AR/border-sensors
Browse files Browse the repository at this point in the history
Border sensors
  • Loading branch information
dlopezalvas authored Oct 3, 2024
2 parents 1f42c09 + dd4ef4f commit db9e9ea
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
16 changes: 16 additions & 0 deletions src/actores/ActorAnimado.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit db9e9ea

Please sign in to comment.