summaryrefslogtreecommitdiffstats
path: root/src/Collision.hs
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2010-03-17 17:55:03 +0100
committerMatthias Schiffer <matthias@gamezock.de>2010-03-17 17:55:03 +0100
commita1294859c7512f3416612f0911946e7768d95bdd (patch)
treec4e6a7d40e4c627620c2bcba1caa0e8f32120df8 /src/Collision.hs
parent98ae7f48c5c041cad0ffebe3793b0c74e8378512 (diff)
downloadhtanks-a1294859c7512f3416612f0911946e7768d95bdd.tar
htanks-a1294859c7512f3416612f0911946e7768d95bdd.zip
Some optimizations
Diffstat (limited to 'src/Collision.hs')
-rw-r--r--src/Collision.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Collision.hs b/src/Collision.hs
index fad7cd6..9ad898b 100644
--- a/src/Collision.hs
+++ b/src/Collision.hs
@@ -15,7 +15,7 @@ tankLength :: Micro
tankLength = 0.95
bulletDiameter :: Micro
-bulletDiameter = 0.2
+bulletDiameter = 0.1
collisionTankBorder :: Micro -> Micro -> Tank -> Tank
collisionTankBorder lw lh tank = tank {tankX = newx, tankY = newy}
@@ -48,4 +48,4 @@ collisionTankBorder lw lh tank = tank {tankX = newx, tankY = newy}
collisionBulletBullet :: (Bullet, Bullet) -> (Bullet, Bullet) -> Bool
collisionBulletBullet (b1, b1') (b2, b2') = distancesq < (bulletDiameter^2)
where
- distancesq = (bulletX b1' - bulletX b2')^2 + (bulletY b1' - bulletY b2')^2 \ No newline at end of file
+ distancesq = (bulletX b1' - bulletX b2')^2 + (bulletY b1' - bulletY b2')^2