Commit 11c2e54f authored by Daniel Graungaard's avatar Daniel Graungaard
Browse files

Halfway initial setup of model

parent 79a12275
breed[videos video]
videos-own [emotionelt utrolige-evner empati humor]
patches-own [empaty-præference humor-præference utrolige-evner-præference nuttethed-præference]
videos-own [emotionelt utrolige-evner nuttethed humor]
patches-own [empati-præference humor-præference utrolige-evner-præference nuttethed-præference]
to setup
......@@ -9,22 +9,42 @@ to setup
;top right - ældre
ask patches with [pxcor < 0 and pycor > 0] [
set pcolor rgb 0 0 (random 255)
set utrolige-evner-præference number-from-interval [5 7]
set empati-præference number-from-interval [6 8]
set humor-præference number-from-interval [3 5]
set nuttethed-præference number-from-interval [6 8]
]
; top left - pre-teens
ask patches with [pxcor > 0 and pycor > 0] [
set pcolor rgb (random 255) 255 255
set utrolige-evner-præference number-from-interval [5 7]
set empati-præference number-from-interval [3 5]
set humor-præference number-from-interval [8 10]
set nuttethed-præference number-from-interval [8 10]
]
; bottom left - teens
ask patches with [pxcor < 0 and pycor < 0] [
set pcolor rgb 255 (random 255) 255
set utrolige-evner-præference number-from-interval [7 9]
set empati-præference number-from-interval [5 7]
set humor-præference number-from-interval [8 10]
set nuttethed-præference number-from-interval [4 5]
]
; bottom right - voksne
ask patches with [pxcor > 0 and pycor < 0] [
let value 255
set pcolor rgb 255 255 (random 255)
set utrolige-evner-præference number-from-interval [7 10]
set empati-præference number-from-interval [8 10]
set humor-præference number-from-interval [5 7]
set nuttethed-præference number-from-interval [6 8]
]
......@@ -32,6 +52,48 @@ to setup
set pcolor grey
]
set-default-shape videos "video"
create-videos 1 [
(ifelse start = "TOP LEFT" [
setxy (-1 - random half-of-worlds-width) (random half-of-worlds-height + 1)
] start = "TOP RIGHT" [
setxy (random half-of-worlds-width + 1) (random half-of-worlds-height + 1)
] start = "BOTTOM RIGHT" [
setxy (-1 - random half-of-worlds-width) (-1 - random half-of-worlds-height)
] start = "BOTTOM LEFT" [
setxy (random half-of-worlds-width + 1) (-1 - random half-of-worlds-height)
])
set utrolige-evner 10
set emotionelt 10
set humor 10
set nuttethed 10
]
end
to-report half-of-worlds-height
report random world-height / 2
end
to-report half-of-worlds-width
report random world-width / 2
end
to-report number-from-interval [interval]
let delta last interval - first interval + 1
report random delta + first interval
end
@#$#@#$#@
GRAPHICS-WINDOW
......@@ -78,6 +140,16 @@ NIL
NIL
1
CHOOSER
34
177
178
222
start
start
"TOP RIGHT" "TOP LEFT" "BOTTOM RIGHT" "BOTTOM LEFT"
3
@#$#@#$#@
## WHAT IS IT?
......@@ -394,6 +466,12 @@ Polygon -10899396 true false 132 85 134 64 107 51 108 17 150 2 192 18 192 52 169
Polygon -10899396 true false 85 204 60 233 54 254 72 266 85 252 107 210
Polygon -7500403 true true 119 75 179 75 209 101 224 135 220 225 175 261 128 261 81 224 74 135 88 99
video
true
0
Circle -2674135 true false 15 15 270
Polygon -7500403 true true 106 89 106 209 226 149 106 89 106 89
wheel
false
0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment