Advertisement
jsprieto10

Untitled

Mar 27th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. (machine robotLadrillos
  2.  
  3. (var ladrillosAzules := [30])
  4. (var ladrillosAmarillos := [30])
  5. (var movingY := [false])
  6. (var movingB := [false])
  7. (var moving := [false])
  8. (var total := [60])
  9.  
  10. (event move [moving])
  11. (event yellow [movingY])
  12. (event blue [movingB])
  13.  
  14.  
  15. (state repartidor)
  16. (state amarillo (onentry [movingY := true. ladrillosAmarillos := ladrillosAmarillos-1. total := total-1])
  17. (onexit[movingY := false. movingB := true]))
  18. (state azul
  19. (onentry [movingB := true. ladrillosAzules := ladrillosAzules-1. total := total-1]))
  20. (state standBy (onentry [moving := false]))
  21.  
  22. (on move repartidor -> amarillo)
  23. (on move repartidor -> azul)
  24. (on blue amarillo -> repartidor)
  25. (on blue azul -> repartidor)
  26. )
  27. (spawn robotLadrillos repartidor)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement