fixes
This commit is contained in:
@@ -384,7 +384,6 @@ public class Facade implements IFacade {
|
||||
}
|
||||
|
||||
/**
|
||||
* <<<<<<< HEAD
|
||||
* Create and return a new worm that is positioned at the given location, looks
|
||||
* in the given direction, has the given radius and the given name.
|
||||
*
|
||||
|
@@ -595,7 +595,7 @@ public class Worm {
|
||||
|
||||
public void collision(Worm smallestWorm, Worm largestWorm) {
|
||||
long total = 1 + (new Random().nextLong() * (10 - 1));
|
||||
long loseSmallest = total/(largestWorm.getOrientation()/(smallestWorm.getOrientation()+largestWorm.getOrientation()));
|
||||
long loseSmallest = (long) (total / (largestWorm.getOrientation() / (smallestWorm.getOrientation() + largestWorm.getOrientation())));
|
||||
long loseLargest = total - loseSmallest;
|
||||
smallestWorm.decreaseHitPoints(loseSmallest);
|
||||
largestWorm.decreaseHitPoints(loseLargest);
|
||||
|
Reference in New Issue
Block a user