mirror of
https://github.com/Cpt-Adok/SNAKE.git
synced 2026-03-28 17:13:43 +00:00
24 lines
532 B
Java
24 lines
532 B
Java
package Characters;
|
|
|
|
public class Players extends Personnage {
|
|
public Players(int[] coordinate, int n) {
|
|
super(n, coordinate);
|
|
}
|
|
|
|
public Integer changeCoordinate(String input) {
|
|
if (input.length() > 0) {
|
|
return (int)input.charAt(0);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public boolean moveCoordinate(int keys) {
|
|
Mouvements value = getMouvement(keys);
|
|
if (value != null) {
|
|
moveSnake(value);
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
}
|