albertohilal

Clase 4 Ejercicio 3.3.3

Sep 4th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. /*Escribir la funcion hayEnemigosAl que determina
  2. si hay enemigos en la celda lindante en la direccion dada.
  3. ¿Cual es la precondicion de la funcion?
  4. PRECONDICION: Tener celdas en la direccion dada*/
  5.  
  6. function hayEnemigosAl(dir){
  7. Mover(dir)
  8. return (hayBolitas(Rojo))
  9. }
  10.  
  11. procedure Main(){
  12. valor:= hayEnemigosAl(Norte)
  13. return(valor)
  14. }
Advertisement
Add Comment
Please, Sign In to add comment