Optimized Ticking and Rendering #5

Merged
CyB3RC0nN0R merged 5 commits from feature/optimized_pipeline into develop 2020-07-01 20:17:13 +02:00
7 changed files with 272 additions and 248 deletions
Showing only changes of commit 52a4c876fa - Show all commits

40
src/main/dev/lh/Food.java Normal file
View File

@ -0,0 +1,40 @@
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
package dev.lh;
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
import java.awt.Color;
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
import java.awt.Graphics2D;
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
import java.awt.Rectangle;
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
/**
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* Project: <strong>Snake</strong><br>
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* File: <strong>Food.java</strong><br>
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* Created: <strong>01.07.2020</strong><br>
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @author Kai S. K. Engelbart
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @since Snake 1.1
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*/
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public final class Food implements Updateable {
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
private final Color color;
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
private final int lengthBonus;
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
private final Rectangle bounds;
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public Food(Color color, int lengthBonus, Rectangle bounds) {
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
this.color = color;
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
this.lengthBonus = lengthBonus;
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
this.bounds = bounds;
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
}
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public void checkCollision(Snake snake) {
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
if (bounds.intersects(snake.getHead())) {}
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
}
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
@Override
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public void render(Graphics2D g) {
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
g.setColor(color);
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
g.fill(bounds);
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
}
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public int getLengthBonus() { return lengthBonus; }
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public Rectangle getBounds() { return bounds; }
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
}
delvh commented 2020-07-01 19:42:47 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:13 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:38 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:43:55 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```

View File

@ -2,202 +2,68 @@ package dev.lh;
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
import static java.awt.Color.*; import static java.awt.Color.*;
import java.awt.*; import java.awt.Color;
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
import java.awt.Rectangle;
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
import java.util.Random; import java.util.Random;
import dev.lh.ui.GameWindow;
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
/** /**
* Generates food items with predefined properties at random positions and calculates the next
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* spawning time.
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* <p>
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* Project: <strong>Snake</strong><br> * Project: <strong>Snake</strong><br>
* File: <strong>FoodFactory.java</strong><br> * File: <strong>FoodFactory.java</strong><br>
* Created: <strong>11 Mar 2020</strong><br> * Created: <strong>11 Mar 2020</strong><br>
* *
* @author Leon Hofmeister * @author Leon Hofmeister
* @author Kai S. K. Engelbart
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @since Snake 1.0 * @since Snake 1.0
*/ */
public class FoodFactory { public final class FoodFactory {
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
private int width, height;
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
private long nextSpawnTime;
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
private Random random = new Random();
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
private static final Color[] FOOD_COLORS = {
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
WHITE, YELLOW, ORANGE, RED, BLUE
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
};
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
private static final int[] FOOD_LENGTH_BONUSES = {
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
40, 15, 6, 2, 1
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
};
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
/** /**
* This enum contains all possible variations of foods. The higher the ordinal * Initializes a food factory.
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* of an element, the less it is worth.<br>
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* <br>
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* Project: <strong>Snake</strong><br>
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* File: <strong>FoodFactory.java</strong><br>
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* Created: <strong>11 Mar 2020</strong><br>
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* *
* @author Leon Hofmeister * @param width the width of the viewport
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @since Snake 1.0 * @param height the height of the viewport
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @since Snake 1.1
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*/ */
public enum Food { public FoodFactory(int width, int height) {
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
this.width = width;
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
this.height = height;
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
}
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
/** /**
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* Use if white food is wanted. * @return a new food item
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*/ * @since Snake 1.1
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
white( */
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
WHITE, 40 public synchronized Food spawn() {
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
), nextSpawnTime = System.currentTimeMillis() + random.nextInt(15000) + 1000;
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
int seed = random.nextInt(5);
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
/** return new Food(
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* Use if yellow food is wanted. FOOD_COLORS[seed],
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*/ FOOD_LENGTH_BONUSES[seed],
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
yellow( new Rectangle(random.nextInt(width - 100) + 50,
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
YELLOW, 15 random.nextInt(height - 100) + 50,
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
), seed * 10,
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
seed * 10
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
/** )
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* Use if orange food is wanted.
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*/
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
orange(
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
ORANGE, 6
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
),
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
/**
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* Use if red food is wanted.
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*/
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
red(
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
RED, 2
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
),
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
/**
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* Use if blue food is wanted.
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*/
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
blue(
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
BLUE, 1
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
); );
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
/**
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* The color of the food item.
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*/
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public final Color color;
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
/**
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* The length bonus of the food item.
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*/
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public final int lengthBonus;
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
private Food(Color color, int lengthBonus) {
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
this.color = color;
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
this.lengthBonus = lengthBonus;
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
}
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
}
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
private static FoodFactory foodFactory = new FoodFactory();
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
private long timeOfNextFood;
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
private Point pFood;
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
private Food nextFood = Food.white;
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
private int rectangleSize = 6;
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
private FoodFactory() {}
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
/**
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @return the (singleton) instance of FoodFactory
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @since Snake 1.0
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*/
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public static FoodFactory getInstance() { return foodFactory; }
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
/**
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @return a new {@link Food} object without its position
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @since Snake 1.0
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*/
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public Food generateFood() {
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
nextFood = Food.values()[new Random().nextInt(Food.values().length)];
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
rectangleSize = nextFood.ordinal() + 2;
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
setTimeToNextFoodMillis();
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
return nextFood;
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
} }
/** /**
* Generates the amount of time that needs to pass before the next food object * @return the time after which a new food item should be spawned
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* will be constructed. * @since Snake 1.1
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @since Snake 1.0
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*/ */
public void setTimeToNextFoodMillis() { public long getNextSpawnTime() { return nextSpawnTime; }
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
timeOfNextFood = System.currentTimeMillis() + new Random().nextInt(15000) + 1000;
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
}
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
/**
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @return the type of the next food
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @since Snake 1.0
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*/
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public Food getNextFood() { return nextFood; }
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
/**
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @param nextFood the type the next food should have
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @since Snake 1.0
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*/
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public void setNext(Food nextFood) { this.nextFood = nextFood; }
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
/**
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @return the time at which a new food object will be automatically created
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @since Snake 1.0
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*/
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public long getTimeOfNextFood() { return timeOfNextFood; }
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
/**
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @param width the width of the currently used {@link GameWindow}
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @param height the height of the currently used {@link GameWindow}
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @return the position of the new {@link Food} object
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @since Snake 1.0
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*/
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public Point generateFoodLocation(int width, int height) {
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
assert (width > 100 && height > 100);
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
Random r = new Random();
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
return pFood = new Point(r.nextInt(width - 100) + 50, r.nextInt(height - 100) + 50);
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
}
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
/**
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @return the size of the corresponding food (length = width)
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @since Snake 1.0
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*/
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public int getRectangleSize() { return rectangleSize; }
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
/**
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @return the location of the currently displayed food
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @since Snake 1.0
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*/
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public Point getFoodLocation() { return pFood; }
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
/**
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* Sets the color of the given {@link Graphics} object according to the type of
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* food.
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @param g the graphics object to paint
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @since Snake 1.0
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*/
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public void colorOfFood(Graphics g) {
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
g.setColor(nextFood.color);
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
}
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
/**
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @param g the {@link Graphics} object used to paint the current food object
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @since Snake 1.0
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*/
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public void paintFood(Graphics g) {
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
colorOfFood(g);
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
g.fillRect(pFood.x, pFood.y, 5 * rectangleSize, 5 * rectangleSize);
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
}
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
/**
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @param snakeHead the the head of a {@link Snake} object
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @return true if the current food intersects with the snake head
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @since Snake 1.0
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*/
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public boolean checkCollision(Rectangle snakeHead) {
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
int s = rectangleSize * 5;
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
Rectangle food = new Rectangle(pFood, new Dimension(s, s));
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
return food.intersects(snakeHead);
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
}
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
/**
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @return the length that will be added to the snake
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @since Snake 1.0
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*/
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public int getAdditionalLength() {
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
return nextFood.lengthBonus;
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
}
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
} }

delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:32 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:44 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:44:52 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```

View File

@ -0,0 +1,46 @@
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
package dev.lh;
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
import java.awt.Graphics2D;
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
/**
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* Manages the state of game objects.
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* <p>
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* Project: <strong>Snake</strong><br>
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* File: <strong>Handler.java</strong><br>
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* Created: <strong>01.07.2020</strong><br>
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @author Kai S. K. Engelbart
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @since Snake 1.1
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*/
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public final class Handler implements Updateable {
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
private Snake snake = new Snake(7);
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
private FoodFactory foodFactory;
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
private volatile Food food;
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public Handler(Snake snake, FoodFactory foodFactory) {
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
this.snake = snake;
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
this.foodFactory = foodFactory;
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
food = foodFactory.spawn();
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
}
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
@Override
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public void tick() {
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
snake.tick();
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
food.tick();
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
// Check for food collision
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
if (snake.getHead().intersects(food.getBounds())) {
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
snake.addLength(food.getLengthBonus());
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
food = foodFactory.spawn();
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
}
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
if (System.currentTimeMillis() > foodFactory.getNextSpawnTime())
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
food = foodFactory.spawn();
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
}
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
@Override
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public void render(Graphics2D g) {
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
snake.render(g);
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
food.render(g);
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
}
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
}
delvh commented 2020-07-01 19:45:09 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:45:16 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```

View File

@ -7,7 +7,6 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import dev.lh.ui.Endscreen; import dev.lh.ui.Endscreen;
import dev.lh.ui.GameWindow;
/** /**
* Project: <strong>Snake</strong><br> * Project: <strong>Snake</strong><br>
@ -51,7 +50,6 @@ public class Snake implements Updateable {
DOWN; DOWN;
} }
private static FoodFactory foodFactory = FoodFactory.getInstance();
private static Endscreen endscreen; private static Endscreen endscreen;
private Direction direction = Direction.RIGHT; private Direction direction = Direction.RIGHT;
private int length; private int length;
@ -103,14 +101,8 @@ public class Snake implements Updateable {
Main.getGame().close(); Main.getGame().close();
} }
/**
* @return the current {@link Direction} of the snake
* @since Snake 1.0
*/
public Direction getRichtung() { return direction; }
@Override @Override
public void nextFrame() { public void tick() {
int velX = 0, velY = 0; int velX = 0, velY = 0;
switch (direction) { switch (direction) {
case UP: case UP:
@ -140,18 +132,11 @@ public class Snake implements Updateable {
return; return;
} }
// TODO: Test on Linux // TODO: Test on Linux
if (!Main.getGame().getBounds().contains(tiles.get(0))) { if (!Main.getGame().getBounds().contains(getHead())) {
gameOver(); gameOver();
System.out.println("Snake went out of bounds."); System.out.println("Snake went out of bounds.");
return; return;
} }
// TODO: Move to Food class
// Case if snake eats food
if (foodFactory.checkCollision(tiles.get(0))) {
addLength(foodFactory.getAdditionalLength());
GameWindow game = Main.getGame();
game.newFood();
}
} }
@Override @Override
@ -160,9 +145,21 @@ public class Snake implements Updateable {
tiles.forEach(g::fill); tiles.forEach(g::fill);
} }
/**
* @return the current {@link Direction} of the snake
* @since Snake 1.0
*/
public Direction getDirection() { return direction; }
/** /**
* @param direction the new {@link Direction} of the snake * @param direction the new {@link Direction} of the snake
* @since Snake 1.0 * @since Snake 1.0
*/ */
public void setDirection(Direction direction) { this.direction = direction; } public void setDirection(Direction direction) { this.direction = direction; }
/**
* @return a rectangle representing the head of the snake
* @since Snake 1.1
*/
public Rectangle getHead() { return tiles.get(0); }
} }

View File

@ -20,7 +20,7 @@ public interface Updateable {
* *
* @since Snake 1.0 * @since Snake 1.0
*/ */
void nextFrame(); default void tick() {}
/** /**
* Renders the object. * Renders the object.
@ -28,5 +28,5 @@ public interface Updateable {
* @param g the graphics object that is used to render this object * @param g the graphics object that is used to render this object
* @since Snake 1.0 * @since Snake 1.0
*/ */
void render(Graphics2D g); default void render(Graphics2D g) {}
} }

View File

@ -0,0 +1,98 @@
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
package dev.lh;
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
import java.awt.Canvas;
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
import java.awt.Color;
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
import java.awt.Graphics2D;
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
import java.util.Timer;
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
import java.util.TimerTask;
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
/**
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* Implements a hardware-accelerated rendering loop.
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* <p>
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* Project: <strong>Snake</strong><br>
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* File: <strong>Viewport.java</strong><br>
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* Created: <strong>01.07.2020</strong><br>
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @author Kai S. K. Engelbart
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @since Snake 1.0
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*/
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public class Viewport extends Canvas {
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
private static final long serialVersionUID = 1L;
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
// Enable OpenGL hardware acceleration
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
static {
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
System.setProperty("sun.java2d.trace", "timestamp,log,count");
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
System.setProperty("sun.java2d.transaccel", "True");
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
System.setProperty("sun.java2d.opengl", "True");
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
}
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
private Updateable gameRoot;
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
private Timer timer = new Timer();
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
private TimerTask renderTask;
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
/**
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @param gameRoot the game object responsible for updating the rest
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @since Snake 1.0
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*/
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public Viewport(Updateable gameRoot) {
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
this.gameRoot = gameRoot;
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
setIgnoreRepaint(true);
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
}
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
/**
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* Starts the render task.
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @since Snake 1.1
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*/
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public void start() {
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
if (renderTask != null)
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
renderTask.cancel();
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
else
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
createBufferStrategy(2);
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
renderTask = new TimerTask() {
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
private long lastTime = System.currentTimeMillis();
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
@Override
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public void run() {
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
long time = System.currentTimeMillis();
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
double dt = (time - lastTime) * 1E-3;
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
lastTime = time;
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
gameRoot.tick();
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
render();
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
}
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
};
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
timer.schedule(renderTask, 0, 100);
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
}
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
/**
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* Stops the render task.
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
* @since Snake 1.1
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*/
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
public void stop() {
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
renderTask.cancel();
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
}
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
private void render() {
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
Graphics2D g = (Graphics2D) getBufferStrategy().getDrawGraphics();
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
// Clear the screen
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
g.setColor(Color.BLACK);
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
g.fillRect(0, 0, getWidth(), getHeight());
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
// Perform the actual rendering
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
gameRoot.render(g);
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
// Flip buffers
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
g.dispose();
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
getBufferStrategy().show();
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
// Synchronize with display refresh rate
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
getToolkit().sync();
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
}
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
}
delvh commented 2020-07-01 19:55:38 +02:00 (Migrated from github.com)
Review
 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:56:50 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 19:58:09 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
delvh commented 2020-07-01 20:04:49 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```

View File

@ -1,15 +1,14 @@
package dev.lh.ui; package dev.lh.ui;
import java.awt.*; import java.awt.Dimension;
import java.awt.Rectangle;
import java.awt.Toolkit;
import java.awt.event.KeyAdapter; import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;
import javax.swing.JFrame; import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.Timer;
import dev.lh.FoodFactory; import dev.lh.*;
import dev.lh.Snake;
import dev.lh.Snake.Direction; import dev.lh.Snake.Direction;
/** /**
@ -22,21 +21,20 @@ import dev.lh.Snake.Direction;
*/ */
public class GameWindow extends JFrame { public class GameWindow extends JFrame {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private Snake s = new Snake(7);
private FoodFactory foodFactory = FoodFactory.getInstance(); private Viewport viewport;
private Timer timer;
/** /**
* @param title the title of the frame * @param title the title of the frame
* @since Snake 1.0 * @since Snake 1.0
*/ */
public GameWindow(String title) { public GameWindow(String title) {
// Initialize window
super(title); super(title);
Dimension size = Toolkit.getDefaultToolkit().getScreenSize(); Dimension size = Toolkit.getDefaultToolkit().getScreenSize();
setBounds(new Rectangle(size)); setBounds(new Rectangle(size));
setLocation(0, 0); setLocation(0, 0);
setLocationRelativeTo(null);
setMinimumSize(size); setMinimumSize(size);
setPreferredSize(size); setPreferredSize(size);
setMaximumSize(size); setMaximumSize(size);
@ -44,19 +42,14 @@ public class GameWindow extends JFrame {
setResizable(false); setResizable(false);
setDefaultCloseOperation(EXIT_ON_CLOSE); setDefaultCloseOperation(EXIT_ON_CLOSE);
add(new JPanel() { // Initialize game objects
Snake snake = new Snake(7);
FoodFactory foodFactory = new FoodFactory(getWidth(), getHeight());
Handler handler = new Handler(snake, foodFactory);
private static final long serialVersionUID = 1L; // Initialize viewport
viewport = new Viewport(handler);
@Override add(viewport);
protected void paintComponent(Graphics g) {
super.paintComponent(g);
g.setColor(Color.black);
g.fillRect(0, 0, getWidth(), getHeight());
s.render((Graphics2D) g);
foodFactory.paintFood(g);
}
});
addKeyListener(new KeyAdapter() { addKeyListener(new KeyAdapter() {
@ -66,56 +59,40 @@ public class GameWindow extends JFrame {
switch (e.getKeyCode()) { switch (e.getKeyCode()) {
case KeyEvent.VK_W: case KeyEvent.VK_W:
case KeyEvent.VK_UP: case KeyEvent.VK_UP:
if (!s.getRichtung().equals(Direction.DOWN)) s.setDirection(Direction.UP); if (!snake.getDirection().equals(Direction.DOWN))
snake.setDirection(Direction.UP);
break; break;
case KeyEvent.VK_A: case KeyEvent.VK_A:
case KeyEvent.VK_LEFT: case KeyEvent.VK_LEFT:
if (!s.getRichtung().equals(Direction.RIGHT)) s.setDirection(Direction.LEFT); if (!snake.getDirection().equals(Direction.RIGHT))
snake.setDirection(Direction.LEFT);
break; break;
case KeyEvent.VK_S: case KeyEvent.VK_S:
case KeyEvent.VK_DOWN: case KeyEvent.VK_DOWN:
if (!s.getRichtung().equals(Direction.UP)) s.setDirection(Direction.DOWN); if (!snake.getDirection().equals(Direction.UP))
snake.setDirection(Direction.DOWN);
break; break;
case KeyEvent.VK_D: case KeyEvent.VK_D:
case KeyEvent.VK_RIGHT: case KeyEvent.VK_RIGHT:
if (!s.getRichtung().equals(Direction.LEFT)) s.setDirection(Direction.RIGHT); if (!snake.getDirection().equals(Direction.LEFT))
snake.setDirection(Direction.RIGHT);
break; break;
} }
} }
}); });
newFood();
timer = new Timer(
50,
evt -> {
s.nextFrame();
if (System.currentTimeMillis() >= foodFactory.getTimeOfNextFood())
newFood();
repaint();
}
);
timer.start();
setVisible(true); setVisible(true);
viewport.start();
} }
/** /**
* Generates new food. * Disposes this frame.
*
* @since Snake 1.1
*/
public void newFood() {
foodFactory.generateFood();
foodFactory.generateFoodLocation(getWidth(), getHeight());
}
/**
* Disposes this frame
* *
* @since Snake 1.1 * @since Snake 1.1
*/ */
public void close() { public void close() {
timer.stop(); viewport.stop();
setVisible(false);
dispose(); dispose();
} }
} }