Commit bf899464 authored by rokka's avatar rokka

speed resets now after each level and refocatoring

parent aeaf71da
This diff is collapsed.
......@@ -57,7 +57,7 @@
1 0 10 #"text-box%\0"
1 0 32 #"(lib \"text-snipclass.ss\" \"xml\")\0"
1 0 1 6 #"wxloc\0"
0 0 98 0 1 #"\0"
0 0 100 0 1 #"\0"
0 75 1 #"\0"
0 12 90 -1 90 -1 3 -1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 255 255 255 1 -1 0 9
#"Standard\0"
......@@ -348,7 +348,13 @@
255 255 -1 -1 4 1 #"\0"
0 -1 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 1 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255
255 0 -1 -1 0 3422 0 17 3 85
255 0 -1 -1 38 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 255 255 255 -1 -1
32 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 255 255 255 -1 -1
0 3438 0 17 3 85
(
#";; The first three lines of this file were inserted by DrRacket. The"
#"y record metadata"
......@@ -2288,6 +2294,50 @@
0 0 25 3 2 #"))"
0 0 25 29 1 #"\n"
0 0 25 29 1 #"\n"
0 0 25 29 1 #"\n"
0 0 17 3 31 #"; WorldState -> List-of-Targets"
0 0 25 29 1 #"\n"
0 0 17 3 46 #"; gets the list-of-targets for the given world"
0 0 25 29 1 #"\n"
0 0 25 3 1 #"("
0 0 14 3 12 #"check-expect"
0 0 25 3 2 #" ("
0 0 14 3 15 #"get-target-list"
0 0 25 3 1 #" "
0 0 14 3 7 #"WORLD_0"
0 0 25 3 3 #") ("
0 0 14 3 5 #"first"
0 0 25 3 2 #" ("
0 0 14 3 4 #"rest"
0 0 25 3 2 #" ("
0 0 14 3 5 #"first"
0 0 25 3 2 #" ("
0 0 14 3 17 #"WorldState-levels"
0 0 25 3 1 #" "
0 0 14 3 7 #"WORLD_0"
0 0 25 3 6 #"))))) "
0 0 25 29 1 #"\n"
0 0 25 3 1 #"("
0 0 15 3 6 #"define"
0 0 25 3 2 #" ("
0 0 14 3 15 #"get-target-list"
0 0 25 3 1 #" "
0 0 14 3 5 #"world"
0 0 25 3 1 #")"
0 0 25 29 1 #"\n"
0 0 25 3 3 #" ("
0 0 14 3 5 #"first"
0 0 25 3 2 #" ("
0 0 14 3 4 #"rest"
0 0 25 3 2 #" ("
0 0 14 3 5 #"first"
0 0 25 3 2 #" ("
0 0 14 3 17 #"WorldState-levels"
0 0 25 3 1 #" "
0 0 14 3 5 #"world"
0 0 25 3 5 #")))))"
0 0 25 29 1 #"\n"
0 0 25 29 1 #"\n"
0 0 17 3 31 #"; Target, WorldState -> Boolean"
0 0 25 29 1 #"\n"
0 0 17 3 90
......@@ -2526,16 +2576,10 @@
0 0 25 3 6 #" [("
0 0 14 3 6 #"empty?"
0 0 25 3 2 #" ("
0 0 14 3 5 #"first"
0 0 25 3 2 #" ("
0 0 14 3 4 #"rest"
0 0 25 3 2 #" ("
0 0 14 3 5 #"first"
0 0 25 3 1 #"("
0 0 14 3 17 #"WorldState-levels"
0 0 14 3 15 #"get-target-list"
0 0 25 3 1 #" "
0 0 14 3 5 #"world"
0 0 25 3 6 #"))))) "
0 0 25 3 3 #")) "
0 0 22 3 6 #"#false"
0 0 25 3 1 #"]"
0 0 25 29 1 #"\n"
......@@ -2544,16 +2588,10 @@
0 0 25 3 2 #" ("
0 0 14 3 27 #"target-list-collision-check"
0 0 25 3 2 #" ("
0 0 14 3 5 #"first"
0 0 25 3 3 #" ( "
0 0 14 3 4 #"rest"
0 0 25 3 3 #" ( "
0 0 14 3 5 #"first"
0 0 25 3 2 #" ("
0 0 14 3 17 #"WorldState-levels"
0 0 14 3 15 #"get-target-list"
0 0 25 3 1 #" "
0 0 14 3 5 #"world"
0 0 25 3 5 #")))) "
0 0 25 3 2 #") "
0 0 14 3 5 #"world"
0 0 25 3 4 #")]))"
0 0 25 29 1 #"\n"
......@@ -2638,8 +2676,13 @@
0 0 25 3 18 #" ))"
0 0 25 29 1 #"\n"
0 0 25 29 1 #"\n"
0 0 17 3 23 #"; WorldState -> Target "
0 0 17 3 22 #"; WorldState -> Target"
0 0 25 29 1 #"\n"
0 0 17 3 97
(
#"; finds the target with rocket collison in the given world and retur"
#"n empty if no target is found"
) 0 0 25 29 1 #"\n"
0 0 25 3 1 #"("
0 0 14 3 12 #"check-expect"
0 0 25 3 2 #" ("
......@@ -2671,58 +2714,17 @@
0 0 25 3 3 #" ("
0 0 14 3 26 #"target-list-collision-find"
0 0 25 3 2 #" ("
0 0 14 3 5 #"first"
0 0 25 3 2 #" ("
0 0 14 3 4 #"rest"
0 0 25 3 2 #" ("
0 0 14 3 5 #"first"
0 0 25 3 2 #" ("
0 0 14 3 17 #"WorldState-levels"
0 0 14 3 15 #"get-target-list"
0 0 25 3 1 #" "
0 0 14 3 5 #"world"
0 0 25 3 5 #")))) "
0 0 25 3 2 #") "
0 0 14 3 5 #"world"
0 0 25 3 2 #"))"
0 0 25 29 1 #"\n"
0 0 25 29 1 #"\n"
0 0 25 3 1 #"("
0 0 14 3 12 #"check-expect"
0 0 25 3 2 #" ("
0 0 14 3 15 #"get-target-list"
0 0 25 3 1 #" "
0 0 14 3 7 #"WORLD_0"
0 0 25 3 3 #") ("
0 0 14 3 5 #"first"
0 0 25 3 2 #" ("
0 0 14 3 4 #"rest"
0 0 25 3 2 #" ("
0 0 14 3 5 #"first"
0 0 25 3 2 #" ("
0 0 14 3 17 #"WorldState-levels"
0 0 25 3 1 #" "
0 0 14 3 7 #"WORLD_0"
0 0 25 3 6 #"))))) "
0 0 25 29 1 #"\n"
0 0 25 3 1 #"("
0 0 15 3 6 #"define"
0 0 25 3 2 #" ("
0 0 14 3 15 #"get-target-list"
0 0 25 3 1 #" "
0 0 14 3 5 #"world"
0 0 25 3 1 #")"
0 0 25 29 1 #"\n"
0 0 25 3 3 #" ("
0 0 14 3 5 #"first"
0 0 25 3 2 #" ("
0 0 14 3 4 #"rest"
0 0 25 3 2 #" ("
0 0 14 3 5 #"first"
0 0 25 3 2 #" ("
0 0 14 3 17 #"WorldState-levels"
0 0 25 3 1 #" "
0 0 14 3 5 #"world"
0 0 25 3 5 #")))))"
0 0 17 3 30 #"; WorldState -> List-of-Target"
0 0 25 29 1 #"\n"
0 0 17 3 50 #"; removes the collison traget from the target list"
0 0 25 29 1 #"\n"
0 0 25 3 1 #"("
0 0 14 3 12 #"check-expect"
......@@ -2755,17 +2757,9 @@
0 0 25 3 3 #")))"
0 0 25 29 1 #"\n"
0 0 25 29 1 #"\n"
0 0 25 3 1 #"("
0 0 14 3 12 #"check-expect"
0 0 25 3 2 #" ("
0 0 14 3 18 #"update-target-list"
0 0 25 3 1 #" "
0 0 14 3 20 #"WORLD-COLLISION-TEST"
0 0 25 3 3 #") ("
0 0 14 3 17 #"WorldState-levels"
0 0 25 3 1 #" "
0 0 14 3 20 #"WORLD-COLLISION-TEST"
0 0 25 3 2 #"))"
0 0 17 3 30 #"; WorldState -> List-of-Levels"
0 0 25 29 1 #"\n"
0 0 17 3 44 #"; Updates the level target-list on collision"
0 0 25 29 1 #"\n"
0 0 25 3 1 #"("
0 0 14 3 12 #"check-expect"
......@@ -2816,6 +2810,10 @@
0 0 25 3 4 #"))))"
0 0 25 29 1 #"\n"
0 0 25 29 1 #"\n"
0 0 17 3 30 #"; WorldState -> List-of-Levels"
0 0 25 29 1 #"\n"
0 0 17 3 43 #"; Deletes empty levels from the given world"
0 0 25 29 1 #"\n"
0 0 25 3 1 #"("
0 0 15 3 6 #"define"
0 0 25 3 2 #" ("
......@@ -2850,6 +2848,11 @@
0 0 25 3 4 #")]))"
0 0 25 29 1 #"\n"
0 0 25 29 1 #"\n"
0 0 17 3 23 #"; WorldState -> Boolean"
0 0 25 29 1 #"\n"
0 0 17 3 59
#"; Checks if the current level has ended for the given world"
0 0 25 29 1 #"\n"
0 0 25 3 1 #"("
0 0 15 3 6 #"define"
0 0 25 3 2 #" ("
......@@ -2878,6 +2881,11 @@
0 0 25 3 3 #"]))"
0 0 25 29 1 #"\n"
0 0 25 29 1 #"\n"
0 0 17 3 22 #"; WorldState -> Number"
0 0 25 29 1 #"\n"
0 0 17 3 68
#"; adds one point per tick and the points for the target on collision"
0 0 25 29 1 #"\n"
0 0 25 3 1 #"("
0 0 15 3 6 #"define"
0 0 25 3 2 #" ("
......@@ -2928,6 +2936,13 @@
0 0 25 3 3 #" )"
0 0 25 29 1 #"\n"
0 0 25 29 1 #"\n"
0 0 17 3 22 #"; WorldState -> Vector"
0 0 25 29 1 #"\n"
0 0 17 3 94
(
#"; handles the movement of the rocket, if the level is not started th"
#"e rocket ist set to middle"
) 0 0 25 29 1 #"\n"
0 0 25 3 1 #"("
0 0 15 3 6 #"define"
0 0 25 3 2 #" ("
......@@ -2981,32 +2996,48 @@
0 0 25 29 1 #"\n"
0 0 17 3 22 #"; WorldState -> Number"
0 0 25 29 1 #"\n"
0 0 17 3 81
0 0 17 3 93
(
#"; Adds the points of the target that is colliding to the points foun"
#"d in WORLD_0)"
#"; if the game is running use speedmultuplier on the speed of given w"
#"orld, if not (re)set to 1"
) 0 0 25 29 1 #"\n"
0 0 17 3 51 #";(check-expect (add-points-on-collision WORLD_0) 0)"
0 0 25 29 1 #"\n"
0 0 17 3 66
#";(check-expect (add-points-on-collision WORLD-COLLISION-TEST) 100)"
0 0 25 3 1 #"("
0 0 15 3 6 #"define"
0 0 25 3 2 #" ("
0 0 14 3 13 #"speed-handler"
0 0 25 3 1 #" "
0 0 14 3 5 #"world"
0 0 25 3 1 #")"
0 0 25 29 1 #"\n"
0 0 17 3 41 #"; (define (add-points-on-collision world)"
0 0 25 3 3 #" ("
0 0 15 3 4 #"cond"
0 0 25 29 1 #"\n"
0 0 17 3 82
(
#"; g (cond (level-collision-check world)(+ (WorldState-points (level-"
#"collision-find"
) 0 0 25 29 1 #"\n"
0 0 17 3 1 #";"
0 0 25 3 6 #" [("
0 0 14 3 24 #"WorldState-level-started"
0 0 25 3 1 #" "
0 0 14 3 5 #"world"
0 0 25 3 3 #") ("
0 0 14 3 1 #"*"
0 0 25 3 1 #" "
0 0 14 3 16 #"SPEED-MULTIPLIER"
0 0 25 3 2 #" ("
0 0 14 3 16 #"WorldState-speed"
0 0 25 3 1 #" "
0 0 14 3 5 #"world"
0 0 25 3 3 #"))]"
0 0 25 29 1 #"\n"
0 0 25 3 5 #" ["
0 0 14 3 4 #"else"
0 0 25 3 1 #" "
0 0 14 3 11 #"START-SPEED"
0 0 25 3 3 #"]))"
0 0 25 29 1 #"\n"
0 0 25 29 1 #"\n"
0 0 17 3 22 #"; WorldsState -> Scene"
0 0 25 29 1 #"\n"
0 0 17 3 50 #"; create the last scene to draw after end-of-world"
0 0 25 29 1 #"\n"
0 0 25 29 1 #"\n"
0 0 25 3 1 #"("
0 0 15 3 6 #"define"
0 0 25 3 2 #" ("
......@@ -3057,6 +3088,9 @@
0 0 25 3 4 #" )"
0 0 25 29 1 #"\n"
0 0 25 29 1 #"\n"
0 0 17 3 21 #"; WorldState -> Scene"
0 0 25 29 1 #"\n"
0 0 17 3 36 #"; Draw winning scene for given world"
0 0 25 29 1 #"\n"
0 0 25 3 1 #"("
0 0 15 3 6 #"define"
......@@ -3696,14 +3730,10 @@
0 0 25 3 1 #")"
0 0 25 29 1 #"\n"
0 0 25 3 7 #" ("
0 0 14 3 1 #"*"
0 0 25 3 1 #" "
0 0 14 3 16 #"SPEED-MULTIPLIER"
0 0 25 3 2 #" ("
0 0 14 3 16 #"WorldState-speed"
0 0 14 3 13 #"speed-handler"
0 0 25 3 1 #" "
0 0 14 3 7 #"WORLD_0"
0 0 25 3 2 #"))"
0 0 25 3 1 #")"
0 0 25 29 1 #"\n"
0 0 25 3 7 #" ("
0 0 14 3 19 #"WorldState-position"
......@@ -3827,14 +3857,10 @@
0 0 25 3 1 #")"
0 0 25 29 1 #"\n"
0 0 25 3 7 #" ("
0 0 14 3 1 #"*"
0 0 25 3 1 #" "
0 0 14 3 16 #"SPEED-MULTIPLIER"
0 0 25 3 2 #" ("
0 0 14 3 16 #"WorldState-speed"
0 0 14 3 13 #"speed-handler"
0 0 25 3 1 #" "
0 0 14 3 5 #"world"
0 0 25 3 2 #"))"
0 0 25 3 1 #")"
0 0 25 29 1 #"\n"
0 0 25 3 7 #" ("
0 0 14 3 19 #"WorldState-position"
......
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