Logo Bolo: a re-envisioning of the classic tank game by Stuart Cheshire in NetLogo
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

36 Zeilen
621 B

  1. ;; lobo: Logo Bolo
  2. ;; (c) Ben Kurtovic, 2011
  3. breed [bullets bullet]
  4. bullets-own [
  5. max-travel-distance
  6. shooter
  7. speed
  8. travel-distance
  9. ]
  10. to do-bullet-logic
  11. fd speed
  12. set travel-distance travel-distance + speed
  13. if travel-distance > max-travel-distance [
  14. die
  15. ]
  16. let mxcor xcor
  17. let mycor ycor
  18. let is-close-enough false
  19. let target min-one-of (turtles-here with [breed = tanks]) [distancexy mxcor mycor]
  20. if target != nobody [
  21. ask target [
  22. if distancexy mxcor mycor < 0.65 [
  23. set is-close-enough true
  24. shot-at myself
  25. ]
  26. ]
  27. ]
  28. if is-close-enough [
  29. die
  30. ]
  31. end