Optimized Ticking and Rendering #5

Merged
CyB3RC0nN0R merged 5 commits from feature/optimized_pipeline into develop 2020-07-01 20:17:13 +02:00
9 changed files with 390 additions and 361 deletions

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

@ -0,0 +1,54 @@
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 ```
* Represents a food item.
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 ```
* <p>
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.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 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 ```
/**
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 ```
* Constructs a food item.
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 ```
* @param color the color of the food item
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 ```
* @param lengthBonus the length added to the snake when the food item is eaten
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 ```
* @param bounds the bounds of the food item
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.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 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 ```
@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 ```
/**
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 ```
* @return the length added to the snake when the food item is eaten
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.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 ```
/**
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 ```
* @return the bounds of the food item
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.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 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

@ -1,209 +1,69 @@
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 ```
package dev.lh;
import java.awt.*;
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 static 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.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 ```
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 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>
* File: <strong>FoodFactory.java</strong><br>
* Created: <strong>11 Mar 2020</strong><br>
*
* @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
*/
public 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 ```
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 ```
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
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 ```
* 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 ```
*
* @author Leon Hofmeister
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 ```
* @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 ```
* @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 ```
* @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 enum 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 white 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 ```
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 ```
/**
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.
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,
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 ```
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 ```
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 ```
}
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 ```
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 ```
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 ```
}
/**
* Generates the amount of time that needs to pass before the next 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 ```
* will be constructed.
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 ```
* @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 ```
* @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 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 ```
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 ```
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 ```
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 ```
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 ```
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 ```
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 ```
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 ```
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 ```
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 ```
10 + seed * 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 ```
10 + seed * 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 ```
);
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 ```
* @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 ```
* @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 ```
switch (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 ```
case 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 ```
g.setColor(Color.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 ```
break;
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 ```
case yellow:
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(Color.yellow);
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 ```
break;
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 ```
case 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 ```
g.setColor(Color.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 ```
break;
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 ```
case 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 ```
g.setColor(Color.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 ```
break;
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 ```
case 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 ```
g.setColor(Color.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 ```
break;
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 ```
/**
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 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 ```
* @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 ```
int snakeAdditionalLength = 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 ```
switch (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 ```
case 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 ```
snakeAdditionalLength = 40;
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 ```
break;
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 ```
case yellow:
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 ```
snakeAdditionalLength = 15;
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 ```
break;
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 ```
case 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 ```
snakeAdditionalLength = 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 ```
break;
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 ```
case 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 ```
snakeAdditionalLength = 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 ```
break;
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 ```
case 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 ```
snakeAdditionalLength = 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 ```
break;
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 snakeAdditionalLength;
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 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: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,54 @@
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.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 ```
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 ```
/**
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 ```
* Constructs a handler.
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 ```
* @param snake the 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 ```
* @param foodFactory the food factory
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.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 ```
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 ```
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

@ -1,11 +1,12 @@
package dev.lh;
import java.awt.*;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.util.ArrayList;
import java.util.List;
import dev.lh.ui.Endscreen;
import dev.lh.ui.GameWindow;
/**
* Project: <strong>Snake</strong><br>
@ -31,30 +32,30 @@ public class Snake implements Updateable {
/**
* Use if the snake should head left.
*/
Left,
LEFT,
/**
* Use if the snake should head right.
*/
Right,
RIGHT,
/**
* Use if the snake should head up.
*/
Up,
UP,
/**
* Use if the snake should head down.
*/
Down;
DOWN;
}
private static FoodFactory foodFactory = FoodFactory.getInstance();
private static Endscreen endscreen;
private Direction direction;
private Direction direction = Direction.RIGHT;
private int length;
private List<Point> tiles = new ArrayList<>();
private final int snakeSize = 10;
private List<Rectangle> tiles = new ArrayList<>();
private static final int TILE_SIZE = 10;
/**
* Constructs a new Snake with the given length in tiles.
@ -64,20 +65,20 @@ public class Snake implements Updateable {
*/
public Snake(int length) {
this.length = length;
direction = Direction.Right;
// adding the initial tiles of the snake
// Add initial tiles
for (int i = 0; i < length; i++)
tiles.add(new Point(320 - snakeSize * i, 240));
tiles.add(new Rectangle(320 - TILE_SIZE * i, 240, TILE_SIZE, TILE_SIZE));
}
/**
* Adds the given length to the current snake object
* Increases the given length to the current snake object.
*
* @param additional the number of tiles to add
* @since Snake 1.0
*/
public void addLength(int additional) {
Point last = tiles.get(tiles.size() - 1);
Rectangle last = tiles.get(tiles.size() - 1);
for (int i = 0; i < additional; i++)
tiles.add(last);
length += additional;
@ -88,17 +89,10 @@ public class Snake implements Updateable {
* @since Snake 1.1
*/
private boolean checkSelfCollision() {
Point headIndex = tiles.get(0);
Rectangle head = new Rectangle(headIndex.x, headIndex.y, snakeSize, snakeSize);
for (int index = 1; index < tiles.size(); index++) {
Point bodyIndex = tiles.get(index);
if (head.contains(new Rectangle(bodyIndex.x, bodyIndex.y, snakeSize, snakeSize))) return true;
}
return false;
return tiles.stream().skip(1).anyMatch(tiles.get(0)::contains);
}
/**
*
* @since Snake 1.1
*/
private void gameOver() {
@ -107,71 +101,65 @@ public class Snake implements Updateable {
Main.getGame().close();
}
/**
* @return the current {@link Direction} of the snake
* @since Snake 1.0
*/
public Direction getRichtung() { return direction; }
@Override
public void nextFrame() {
public void tick() {
int velX = 0, velY = 0;
switch (direction) {
case Up:
velY = -snakeSize;
case UP:
velY = -TILE_SIZE;
break;
case Down:
velY = snakeSize;
case DOWN:
velY = TILE_SIZE;
break;
case Left:
velX = -snakeSize;
case LEFT:
velX = -TILE_SIZE;
break;
case Right:
velX = snakeSize;
case RIGHT:
velX = TILE_SIZE;
break;
}
Point next = (Point) tiles.get(0).clone(), cur;
tiles.get(0).x += velX;
tiles.get(0).y += velY;
for (int i = 1; i < length; i++) {
cur = tiles.get(i);
tiles.set(i, (Point) next.clone());
next = cur;
}
// case if snake is outside of the screen or touches itself
// Add a new tile at the front
tiles.add(
0,
new Rectangle(tiles.get(0).x + velX, tiles.get(0).y + velY, TILE_SIZE, TILE_SIZE)
);
// Remove the last tile
tiles.remove(tiles.size() - 1);
// Case if snake is outside of the screen or touches itself
if (checkSelfCollision()) {
gameOver();
System.out.println("Snake collided with itself.");
return;
}
// TODO: the game bounds checking below appears to work on Windows, however
// throws a NullPointerException on Linux/UNIX systems
if (!Main.getGame().getBounds().contains(tiles.get(0))) {
// TODO: Test on Linux
if (!Main.getGame().getBounds().contains(getHead())) {
gameOver();
System.out.println("Snake went out of bounds.");
return;
}
// case if snake eats food
if (foodFactory.checkCollision(new Rectangle(tiles.get(0).x, tiles.get(0).y, snakeSize, snakeSize))) {
addLength(foodFactory.getAdditionalLength());
GameWindow game = Main.getGame();
game.newFood();
}
}
@Override
public void render(Graphics g) {
public void render(Graphics2D g) {
g.setColor(Color.green);
for (int i = 0; i < length; i++)
g.fillRect(tiles.get(i).x, tiles.get(i).y, snakeSize, snakeSize);
tiles.forEach(g::fill);
}
/**
* @return the current {@link Direction} of the snake
* @since Snake 1.2
*/
public Direction getDirection() { return direction; }
/**
* @param direction the new {@link Direction} of the snake
* @since Snake 1.0
*/
public void setDirection(Direction direction) { this.direction = direction; }
/**
* @return a rectangle representing the head of the snake
* @since Snake 1.2
*/
public Rectangle getHead() { return tiles.get(0); }
}

View File

@ -1,10 +1,10 @@
package dev.lh;
import java.awt.Graphics;
import java.awt.Graphics2D;
/**
* This interface contains everything that needs to updated regularly.<br>
* <br>
* This interface contains everything that needs to be updated regularly.
* <p>
* Project: <strong>Snake</strong><br>
* File: <strong>Updateable.java</strong><br>
* Created: <strong>11 Mar 2020</strong><br>
@ -18,15 +18,15 @@ public interface Updateable {
* Here should the actions be implemented that are supposed to happen when a new
* frame gets created.
delvh commented 2020-07-01 19:54:02 +02:00 (Migrated from github.com)
Review
	 * @since Snake 1.2
```suggestion * @since Snake 1.2 ```
*
* @since Snake 1.0
* @since Snake 1.2
*/
void nextFrame();
default void tick() {}
/**
* Renders the object.
*
* @param g the {@link 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
*/
void render(Graphics 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.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 ```
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.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 ```
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.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 ```
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 ```
// TODO: Delta time adjustment
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.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 ```
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

@ -31,10 +31,8 @@ public class Endscreen extends JDialog {
*/
public Endscreen(int score) {
this.score = score;
try {
setTitle("Endscreen");
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
setBounds(100, 100, 700, 700);
getContentPane().setLayout(new BorderLayout());
contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
@ -43,7 +41,10 @@ public class Endscreen extends JDialog {
JButton btnNewButton = new JButton("Play again");
btnNewButton.setMnemonic(KeyEvent.VK_ENTER);
btnNewButton.addActionListener(e -> { Main.startGame(); dispose(); });
btnNewButton.addActionListener(e -> {
Main.startGame();
dispose();
});
btnNewButton.setFont(new Font("Times New Roman", Font.PLAIN, 15));
contentPanel.add(btnNewButton, BorderLayout.SOUTH);
@ -52,11 +53,11 @@ public class Endscreen extends JDialog {
contentPanel.add(lblDeinPunktestand, BorderLayout.NORTH);
Image resultImage = Toolkit.getDefaultToolkit()
.getImage(this.getClass().getResource((score < goodOrBadResult) ? "/Try_Again.jpg" : "/1211548-200.png"));
.getImage(
this.getClass()
.getResource((score < goodOrBadResult) ? "/Try_Again.jpg" : "/1211548-200.png")
);
resultImage.flush();
} catch (Exception e) {
e.printStackTrace();
}
}
/**

View File

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

View File

@ -22,12 +22,13 @@ import dev.lh.Main;
public class StartScreen extends JFrame {
private static final long serialVersionUID = 6055940532003735543L;
private JPanel contentPane;
/**
* Closes the application.
*/
public static void close() { System.exit(0); }
public static void close() {
System.exit(0);
}
/**
* Launches Snake.
@ -43,12 +44,11 @@ public class StartScreen extends JFrame {
* Create the frame.
*/
public StartScreen() {
try {
// readInHighscores();
setTitle("Snake - Startscreen");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(500, 200, 550, 550);
contentPane = new JPanel();
JPanel contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
@ -66,8 +66,5 @@ public class StartScreen extends JFrame {
contentPane.add(buPlay);
contentPane.setLayout(null);
setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
}