public MazeCordinate CheckIfMoveAvailable(CardinalDirection movementDirection, Maze maze) { movmentCordinate = getCordinateForCardinalDirection(movementDirection); MazeCordinate mazeCordinate = maze.getMazeCordinate(movmentCordinate[0], movmentCordinate[1]); return(mazeCordinate); }
public MovementResult Move(MazeCordinate mazeCordinate, Maze maze) { switch (mazeCordinate) { case MazeCordinate.START: playerEntranceStartCount++; movePlayer(movmentCardinalDirection, movmentCordinate[0], movmentCordinate[1], (int)MazeCordinate.START, maze); return(MovementResult.BACK_TO_START); case MazeCordinate.ROUTE: movePlayer(movmentCardinalDirection, movmentCordinate[0], movmentCordinate[1], (int)MazeCordinate.ROUTE, maze); return(MovementResult.MOVED); case MazeCordinate.FINISH: movePlayer(movmentCardinalDirection, movmentCordinate[0], movmentCordinate[1], (int)MazeCordinate.FINISH, maze); return(MovementResult.FOUND_FINISH); } return(MovementResult.MOVE_IMPOSSIBLE); }