Explorar el Código

Update copyright for 2012, and some cleanup.

master
Ben Kurtovic hace 13 años
padre
commit
01cc12045b
Se han modificado 7 ficheros con 21 adiciones y 50 borrados
  1. +1
    -1
      base.nls
  2. +1
    -1
      bullet.nls
  3. +1
    -1
      explosion.nls
  4. +3
    -36
      lobo.nlogo
  5. +2
    -2
      pillbox.nls
  6. +2
    -8
      player.nls
  7. +11
    -1
      tank.nls

+ 1
- 1
base.nls Ver fichero

@@ -1,5 +1,5 @@
;; lobo: Logo Bolo
;; (c) Ben Kurtovic, 2011
;; (c) Ben Kurtovic, 2011-2012

breed [bases base]



+ 1
- 1
bullet.nls Ver fichero

@@ -1,5 +1,5 @@
;; lobo: Logo Bolo
;; (c) Ben Kurtovic, 2011
;; (c) Ben Kurtovic, 2011-2012

breed [bullets bullet]



+ 1
- 1
explosion.nls Ver fichero

@@ -1,5 +1,5 @@
;; lobo: Logo Bolo
;; (c) Ben Kurtovic, 2011
;; (c) Ben Kurtovic, 2011-2012

globals [
explosions-table


+ 3
- 36
lobo.nlogo Ver fichero

@@ -1,5 +1,5 @@
;; lobo: Logo Bolo
;; (c) Ben Kurtovic, 2011
;; (c) Ben Kurtovic, 2011-2012
;;
;; Logo Bolo is a re-envisioning of the classic tank game by Stuart Cheshire in NetLogo.
;;
@@ -41,6 +41,7 @@ to setup
spawn-tank 1 6 0 270
spawn-base 0 -7
spawn-pillbox 6 6
show-hud
render
set last-tick-time timer
end
@@ -188,7 +189,7 @@ end
to play-sound [name]
if enable-sound? [
let dist distancexy ([xcor] of player) ([ycor] of player)
let volume 127 - (dist * 8)
let volume 100 - (dist * 4)
if volume > 0 [
sound:play-drum (table:get sounds name) volume
]
@@ -353,49 +354,6 @@ NIL
NIL

@#$#@#$#@
WHAT IS IT?
This section could give a general understanding of what the model is trying to show or explain.


HOW IT WORKS
This section could explain what rules the agents use to create the overall behavior of the model.


HOW TO USE IT
This section could explain how to use the model, including a description of each of the items in the interface tab.


THINGS TO NOTICE
This section could give some ideas of things for the user to notice while running the model.


THINGS TO TRY
This section could give some ideas of things for the user to try to do (move sliders, switches, etc.) with the model.


EXTENDING THE MODEL
This section could give some ideas of things to add or change in the procedures tab to make the model more complicated, detailed, accurate, etc.


NETLOGO FEATURES
This section could point out any especially interesting or unusual features of NetLogo that the model makes use of, particularly in the Procedures tab. It might also point out places where workarounds were needed because of missing features.


RELATED MODELS
This section could give the names of models in the NetLogo Models Library or elsewhere which are of related interest.


CREDITS AND REFERENCES
This section could contain a reference to the model's URL on the web if it has one, as well as any other necessary credits or references.
@#$#@#$#@
default
true


+ 2
- 2
pillbox.nls Ver fichero

@@ -1,5 +1,5 @@
;; lobo: Logo Bolo
;; (c) Ben Kurtovic, 2011
;; (c) Ben Kurtovic, 2011-2012

breed [pillboxes pillbox]

@@ -26,7 +26,7 @@ end

to hatch-pillbox
hatch 1 [
debug who "PILL-HATCH" (word "by " ([who] of myself))
debug who "PILL-PLACE" (word "by " ([who] of myself))
set breed pillboxes
set-pill-vars [team] of myself
]


+ 2
- 8
player.nls Ver fichero

@@ -1,5 +1,5 @@
;; lobo: Logo Bolo
;; (c) Ben Kurtovic, 2011
;; (c) Ben Kurtovic, 2011-2012

globals [
player
@@ -56,13 +56,7 @@ end

to player-place-pill
ask player [
ifelse number-of-pills > 0 [
set number-of-pills number-of-pills - 1
hatch-pillbox
play-sound "place"
] [
play-sound "nopill"
]
place-pill
]
end



+ 11
- 1
tank.nls Ver fichero

@@ -1,5 +1,5 @@
;; lobo: Logo Bolo
;; (c) Ben Kurtovic, 2011
;; (c) Ben Kurtovic, 2011-2012

breed [tanks tank]

@@ -131,6 +131,16 @@ to kill-tank
die
end

to place-pill
ifelse number-of-pills > 0 and count bases-here = 0 [
set number-of-pills number-of-pills - 1
hatch-pillbox
play-sound "place"
] [
play-sound "nopill"
]
end

;; =========
;; Reporters
;; =========


Cargando…
Cancelar
Guardar