Logo Bolo: a re-envisioning of the classic tank game by Stuart Cheshire in NetLogo
No puede seleccionar más de 25 temas
Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
|
- ;; lobo: Logo Bolo
- ;; (c) Ben Kurtovic, 2011
-
- breed [bullets bullet]
-
- bullets-own [
- max-travel-distance
- shooter
- speed
- travel-distance
- ]
-
- to do-bullet-logic
- fd speed
- set travel-distance travel-distance + speed
- if travel-distance > max-travel-distance [
- die
- ]
-
- let mxcor xcor
- let mycor ycor
- let is-close-enough false
- let target min-one-of (turtles-here with [breed = tanks]) [distancexy mxcor mycor]
- if target != nobody [
- ask target [
- if distancexy mxcor mycor < 0.65 [
- set is-close-enough true
- shot-at myself
- ]
- ]
- ]
- if is-close-enough [
- die
- ]
- end
|