Commit 4799ec10 authored by Daniel Graungaard's avatar Daniel Graungaard
Browse files

Added intyerface elements and debugging

parent 582e0243
...@@ -69,6 +69,7 @@ to setup ...@@ -69,6 +69,7 @@ to setup
set emotionelt 10 set emotionelt 10
set humor 10 set humor 10
set nuttethed 10 set nuttethed 10
set energi 10 ; Dette er den mængde energi videoen starter med set energi 10 ; Dette er den mængde energi videoen starter med
set completed-segments (list) set completed-segments (list)
set viewers (list) set viewers (list)
...@@ -100,23 +101,25 @@ end ...@@ -100,23 +101,25 @@ end
to go to go
if any? videos with [energi < 0 ] [user-message "Din video er løbet tør for energi. Øv" stop] if any? videos with [energi <= 0 ] [user-message "Din video er løbet tør for energi. Øv" stop]
if completed? [user-message "Din video har været i alle fire segmenter" stop] if completed? [user-message "Din video har været i alle fire segmenter" stop]
ask videos [ ask videos [
move move
set energi energi - 1
; This is the core of the ssubject matter. The algorithm below !SHOULD! be finalized with teachers! set energi (energi - 1)
; This is the core of the subject 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 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 let average sum deltas / length deltas
(ifelse average <= 1 [ show average
set energi energi + 5 (ifelse abs average <= 1 [
] average <= 2 [ set energi (energi + 1)
set energi energi + 3 ] abs average <= 2 [
] average <= 3 [ set energi (energi + 0.5)
set energi energi + 1 ] abs average <= 3 [
set energi (energi + 0.2)
]) ])
if energi > 1000 [ if energi > 1000 [
...@@ -138,8 +141,8 @@ end ...@@ -138,8 +141,8 @@ end
to move ;turtle method to move ;turtle method
ifelse wall? [ ifelse wall? [
forward -1
right 180 right 180
forward 1
] [ ] [
right random 360 right random 360
forward random 2 forward random 2
...@@ -208,18 +211,15 @@ to-report find-current-segment ...@@ -208,18 +211,15 @@ to-report find-current-segment
]) ])
end end
@#$#@#$#@ @#$#@#$#@
GRAPHICS-WINDOW GRAPHICS-WINDOW
210 402
10 108
647 1368
448 1075
-1 -1
-1 -1
13.0 9.49
1 1
10 10
1 1
...@@ -229,10 +229,10 @@ GRAPHICS-WINDOW ...@@ -229,10 +229,10 @@ GRAPHICS-WINDOW
0 0
0 0
1 1
-16 -50
16 50
-16 -50
16 50
0 0
0 0
1 1
...@@ -264,7 +264,7 @@ CHOOSER ...@@ -264,7 +264,7 @@ CHOOSER
start start
start start
"TOP RIGHT" "TOP LEFT" "BOTTOM RIGHT" "BOTTOM LEFT" "TOP RIGHT" "TOP LEFT" "BOTTOM RIGHT" "BOTTOM LEFT"
3 0
BUTTON BUTTON
117 117
...@@ -301,16 +301,56 @@ NIL ...@@ -301,16 +301,56 @@ NIL
1 1
MONITOR MONITOR
1179 29
201 248
1236 86
246 293
NIL NIL
views views
17 17
1 1
11 11
TEXTBOX
414
116
564
152
Pre-teens
30
46.0
1
TEXTBOX
418
1026
568
1062
Teens
30
0.0
1
TEXTBOX
1275
115
1425
151
Ældre
30
0.0
1
TEXTBOX
1248
1028
1398
1064
Voksne
30
0.0
1
@#$#@#$#@ @#$#@#$#@
## WHAT IS IT? ## WHAT IS IT?
......
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