mirror of
https://github.com/Cpt-Adok/SNAKE.git
synced 2026-03-31 10:21:35 +00:00
Ajout et correction
This commit is contained in:
23
src/Characters/Players.java
Normal file
23
src/Characters/Players.java
Normal file
@@ -0,0 +1,23 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user