Simplified some calculations #4

Merged
CyB3RC0nN0R merged 3 commits from feature/simplification into develop 2020-07-01 14:38:31 +02:00
Showing only changes of commit 7ca0a14ea2 - Show all commits

View File

@ -119,8 +119,7 @@ public class FoodFactory {
public Point generateFoodLocation(int width, int height) {
assert (width > 100 && height > 100);
Random r = new Random();
pFood = new Point(r.nextInt(width - 100) + 50, r.nextInt(height - 100) + 50);
return pFood;
return pFood = new Point(r.nextInt(width - 100) + 50, r.nextInt(height - 100) + 50);
}
/**