Added charakter getDirection function.