public class Snake extends Critter { private int horizontalLength; // supposed to go private int progress; public Snake() { horizontalLength = 1; } public String toString() { return "S"; } /* E S WW S EEE S WWWW S EEEEE S WWWWWW ^ ^ after south: increase horizontal length by 1; toggle direction (boolean?) start going E always go odd number of E; even of W boolean for E vs W number of times you go W (or E or horizontally or Souths) total number of calls on getMove am I going horizontally? am I going E or W? go go south */ public Direction getMove() { if (progress < horizontalLength) { progress++; if (horizontalLength % 2 == 1) { return Direction.EAST; } else { return Direction.WEST; } } else { progress = 0; horizontalLength++; // both increases length AND changes E vs W return Direction.SOUTH; } } }