Commit 96be4efb authored by Daniel Graungaard's avatar Daniel Graungaard
Browse files

Implemented adding energi depending on match

parent fd8a6e95
......@@ -48,6 +48,7 @@ to setup
set nuttethed-præference number-from-interval [6 8]
]
ask patches with [pxcor = 0 or pycor = 0] [
set pcolor grey
]
......@@ -67,17 +68,17 @@ to setup
])
;husk at den samlede mængde point herunder ikke må overstige 30 point
set utrolige-evner 10
set emotionelt 10
set humor 10
set nuttethed 10
set utrolige-evner 7
set emotionelt 3
set humor 4
set nuttethed 2
set energi 10 ; Dette er den mængde energi videoen starter med
set label-color green
]
set size 2
]
end
to-report half-of-worlds-height
......@@ -107,6 +108,26 @@ to go
ask videos [
move
set energi energi - 0.2
; This is the core of the ssubject matter. The algorithm below !SHOULD! be finalized with teachers!
let deltas (list (utrolige-evner-præference - utrolige-evner) (empati-præference - emotionelt) (nuttethed-præference - nuttethed) (humor-præference - humor))
let average sum deltas / length deltas
(ifelse average <= 1 [
set energi energi + 5
] average <= 2 [
set energi energi + 3
] average <= 3 [
set energi energi + 1
])
set label round energi
]
tick
......@@ -115,13 +136,11 @@ end
to move ;turtle method
right 360
left 360
forward random 2
end
@#$#@#$#@
GRAPHICS-WINDOW
210
......@@ -175,7 +194,7 @@ CHOOSER
start
start
"TOP RIGHT" "TOP LEFT" "BOTTOM RIGHT" "BOTTOM LEFT"
3
0
BUTTON
117
......@@ -194,6 +213,23 @@ NIL
NIL
1
BUTTON
24
102
106
135
Go once
go
NIL
1
T
OBSERVER
NIL
NIL
NIL
NIL
1
@#$#@#$#@
## WHAT IS IT?
......
Markdown is supported
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