All I'm doing is extending a critter class of a 2D game. I managed to get the movement of the critters to work, however, I feel as though this method could be written more "cleanly". Any input or advice to help my progression of the java language would be grateful.
//public Direction getMove() { this.northCount++; Direction[] values = Direction.values(); Direction directionValues = values[0]; if(northCount > 5){ directionValues = values[2]; this.eastCount++; } if(eastCount > 5){ directionValues = values[1]; this.southCount++; } if(southCount > 5){ directionValues = values[3]; this.westCount++; } if(westCount > 5){ this.northCount = 1; this.eastCount = 1; this.southCount = 1; this.westCount = 2; } return directionValues; } //