Browse Source

Update copyright for 2012, and some cleanup.

master
Ben Kurtovic 12 years ago
parent
commit
01cc12045b
7 changed files with 21 additions and 50 deletions
  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 View File

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


breed [bases base] breed [bases base]




+ 1
- 1
bullet.nls View File

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


breed [bullets bullet] breed [bullets bullet]




+ 1
- 1
explosion.nls View File

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


globals [ globals [
explosions-table explosions-table


+ 3
- 36
lobo.nlogo View File

@@ -1,5 +1,5 @@
;; lobo: Logo Bolo ;; 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. ;; 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-tank 1 6 0 270
spawn-base 0 -7 spawn-base 0 -7
spawn-pillbox 6 6 spawn-pillbox 6 6
show-hud
render render
set last-tick-time timer set last-tick-time timer
end end
@@ -188,7 +189,7 @@ end
to play-sound [name] to play-sound [name]
if enable-sound? [ if enable-sound? [
let dist distancexy ([xcor] of player) ([ycor] of player) let dist distancexy ([xcor] of player) ([ycor] of player)
let volume 127 - (dist * 8)
let volume 100 - (dist * 4)
if volume > 0 [ if volume > 0 [
sound:play-drum (table:get sounds name) volume sound:play-drum (table:get sounds name) volume
] ]
@@ -353,49 +354,6 @@ NIL
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 default
true true


+ 2
- 2
pillbox.nls View File

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


breed [pillboxes pillbox] breed [pillboxes pillbox]


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


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


+ 2
- 8
player.nls View File

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


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


to player-place-pill to player-place-pill
ask player [ 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 end




+ 11
- 1
tank.nls View File

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


breed [tanks tank] breed [tanks tank]


@@ -131,6 +131,16 @@ to kill-tank
die die
end 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 ;; Reporters
;; ========= ;; =========


Loading…
Cancel
Save