|
@ -1,10 +1,19 @@ |
|
|
package Snake; |
|
|
package Snake; |
|
|
|
|
|
|
|
|
import java.awt.*; |
|
|
import java.awt.*; |
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
|
|
|
public class SnakeView implements Drawable{ |
|
|
public class SnakeView implements Drawable{ |
|
|
|
|
|
|
|
|
|
|
|
private final int cellSize; |
|
|
|
|
|
|
|
|
|
|
|
private ArrayList<Point> positions; |
|
|
|
|
|
|
|
|
|
|
|
public SnakeView(int cellSize) |
|
|
|
|
|
{ |
|
|
|
|
|
positions = new ArrayList<>(); |
|
|
|
|
|
this.cellSize = cellSize; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|