I have made a card game, and have two methods that sort the players hand.
sortHandBySuit();
sortHandByValue();
I would like one method to be called when the user slides their finger from left to right across the screen, and the other from right to left.
public class InputHandler implements InputProcessor{
.............
public boolean touchDragged(int screenX, int screenY, int pointer) {
world.getHand().sortHandBySuit();
return false;
}
.............
}
How can I use touchDragged to call my methods?