Skip to content

Commit

Permalink
Create IdeaparaColisiones
Browse files Browse the repository at this point in the history
  • Loading branch information
NahuelMarek authored Dec 2, 2024
1 parent f18b2d1 commit 326963d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions IdeaparaColisiones
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
object adminVisuales{
const tablero=[
[[][][][][][][][][][][][][][][]],
[[][][][][][][][][][][][][][][]],
[[][][][][][][][][][][][][][][]],
[[][][][][][][][][][][][][][][]],
[[][][][][][][][][][][][][][][]],
]
method asignarposicion(objeto){
const x=objeto.position().x()
const y=objeto.position().y()
tablero.get(0).get(y).get(x).add(objeto)
}
method sacarObjeto(objeto){
const x=objeto.position().x()
const y=objeto.position().y()
tablero.get(0).get(y).get(x).remove(objeto)
}
}
method objetosEnPosicion(x,y){
return tablero.get(0).get(y).get(x)
}

0 comments on commit 326963d

Please sign in to comment.