Remove all AI code from AI file
This commit is contained in:
+13
-1
@@ -12,14 +12,26 @@ import Data.Bifunctor
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
import qualified Data.IntSet as IS
|
||||
zoneSize :: Float
|
||||
zoneSize = 25
|
||||
zoneSize = 50
|
||||
--zoneSize = 100
|
||||
|
||||
floorHun :: Float -> Int
|
||||
floorHun x = floor $ x / zoneSize
|
||||
|
||||
sizeZoneOfPoint :: Float -> Point2 -> (Int,Int)
|
||||
sizeZoneOfPoint s (x,y) = (f x, f y)
|
||||
where
|
||||
f = floor . (/ s)
|
||||
|
||||
zoneOfPoint :: Point2 -> (Int,Int)
|
||||
zoneOfPoint (x,y) = (floorHun x, floorHun y)
|
||||
|
||||
cloudZoneOfPoint :: Point2 -> (Int,Int)
|
||||
cloudZoneOfPoint = sizeZoneOfPoint 20
|
||||
|
||||
crZoneOfPoint :: Point2 -> (Int,Int)
|
||||
crZoneOfPoint = sizeZoneOfPoint 15
|
||||
|
||||
zoneNearPoint :: Point2 -> [(Int,Int)]
|
||||
zoneNearPoint (x',y') = [(a,b) | a<-[x-1,x,x+1] , b<-[y-1,y,y+1]]
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user