parent
615f26f87c
commit
1d43459cb2
@ -0,0 +1,16 @@
|
|||||||
|
package com.snakegame;
|
||||||
|
|
||||||
|
public enum Direction {
|
||||||
|
UP(0, -1),
|
||||||
|
DOWN(0, 1),
|
||||||
|
LEFT(-1, 0),
|
||||||
|
RIGHT(1, 0);
|
||||||
|
|
||||||
|
public final int dx;
|
||||||
|
public final int dy;
|
||||||
|
|
||||||
|
private Direction(int dx, int dy) {
|
||||||
|
this.dx = dx;
|
||||||
|
this.dy = dy;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue