rip out print statements which were solely for debugging
This commit is contained in:
@@ -740,18 +740,12 @@ struct
|
||||
|
||||
fun canJumpOnPlatform (player, platforms, enemy: enemy, platformTree) =
|
||||
let
|
||||
(* todo: possibly get pID and eID of player/enemy in a different way *)
|
||||
val pID = getPlatformBelowPlayer (player, platformTree, platforms)
|
||||
|
||||
val {x, y, ...} = enemy
|
||||
|
||||
val eID = getPlatformBelowEnemy (enemy, platformTree, platforms)
|
||||
|
||||
val _ = print "start best path:\n"
|
||||
|
||||
val bestPath = PathFinding.start (pID, eID, platforms, platformTree)
|
||||
val _ = List.map (fn c => print (Int.toString c ^ "\n")) bestPath
|
||||
|
||||
val _ = print "finished best path\n\n"
|
||||
|
||||
val distance = Constants.moveEnemyBy * Constants.jumpLimit
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ struct
|
||||
val plat3 = {id = 3, x = 355, y = 659, width = 555}
|
||||
val plat4 = {id = 4, x = 155, y = 855, width = 199}
|
||||
val plat5 = {id = 5, x = 155, y = 759, width = 199}
|
||||
val plat6 = {id = 6, x = 155, y = 610, width = 199}
|
||||
val plat6 = {id = 6, x = 155, y = 710, width = 199}
|
||||
val platforms = Vector.fromList [plat1, plat2, plat3, plat4, plat5, plat6]
|
||||
val platformTree = Platform.generateTree platforms
|
||||
|
||||
|
||||
@@ -26,8 +26,7 @@ struct
|
||||
in
|
||||
(isBetween (prevX, curX, prevFinishX)
|
||||
orelse
|
||||
isBetween (prevX, curFinishX, prevFinishX)
|
||||
andalso prevY + 155 >= curY)
|
||||
isBetween (prevX, curFinishX, prevFinishX) andalso prevY + 155 >= curY)
|
||||
end
|
||||
|
||||
fun canDropDownTo (prevPlat: platform, currentPlat: platform) =
|
||||
@@ -39,8 +38,7 @@ struct
|
||||
val curFinishX = curX + curWidth
|
||||
in
|
||||
(isBetween (prevX, curX, prevFinishX)
|
||||
orelse
|
||||
isBetween (prevX, curFinishX, prevFinishX) andalso prevY <= curY)
|
||||
orelse isBetween (prevX, curFinishX, prevFinishX) andalso prevY <= curY)
|
||||
end
|
||||
|
||||
fun isReachableFromLeft (prevPlat, currentPlat) =
|
||||
@@ -126,10 +124,7 @@ struct
|
||||
let
|
||||
val q =
|
||||
DistHeap.insert
|
||||
( { distance = dist
|
||||
, id = foldPlatID
|
||||
, comesFrom = fromPlatID
|
||||
}
|
||||
( {distance = dist, id = foldPlatID, comesFrom = fromPlatID}
|
||||
, q
|
||||
)
|
||||
in
|
||||
@@ -141,12 +136,7 @@ struct
|
||||
let
|
||||
val q =
|
||||
DistHeap.insert
|
||||
( { distance = dist
|
||||
, id = foldPlatID
|
||||
, comesFrom = fromPlatID
|
||||
}
|
||||
, q
|
||||
)
|
||||
({distance = dist, id = foldPlatID, comesFrom = fromPlatID}, q)
|
||||
in
|
||||
(eVals, q)
|
||||
end
|
||||
@@ -262,7 +252,6 @@ struct
|
||||
val pos = IntSet.findInsPos (curID, eKeys)
|
||||
|
||||
val {from, distance, ...} = ValSet.sub (eVals, pos)
|
||||
val _ = print ("266 distance = " ^ Int.toString distance ^ "\n")
|
||||
in
|
||||
helpGetPathList (from, eID, eKeys, eVals, acc)
|
||||
end
|
||||
@@ -274,7 +263,8 @@ struct
|
||||
let
|
||||
val {platforms, ...} = env
|
||||
in
|
||||
if pos = Vector.length platforms then (eVals, q)
|
||||
if pos = Vector.length platforms then
|
||||
(eVals, q)
|
||||
else
|
||||
let
|
||||
val foldPlat = Vector.sub (platforms, pos)
|
||||
|
||||
Reference in New Issue
Block a user