just started self-taught java, today to ask a simple question, why is this method wrong? the error message is
Required: Direction (another class?
found:int
static Direction tileCodeToOrientation (int tileCode) {
int tileIndex = tileCode % 4;
int boardPosition;
if (tileIndex >= 0 && tileIndex<=2){
boardPosition = tileIndex + 6;
}
else if (tileIndex >= 3 && tileIndex<=5){
boardPosition = tileIndex + 8;
}
else if (tileIndex >= 6 && tileIndex<=8){
boardPosition = tileIndex + 10;
}
/* tiles index board board position
col: 3 2 1 row: col: 3 2 1 row:
0 1 2 1 0 1 2 1
3 4 5 2 3 4 5 2
6 7 8 3 6 7 8 3
* /
return boardPosition;
board