else if (x >= p.x + s + b - s * 0.5f && x <= p.x + 2 * s + b - s * 0.5f)
stance = Stance.Scissors;
}
if (stance != null) {
if (stance != pawn.getStance())
action = new Action(pawn, stance);
waiting = false;
lock.notifyAll();
return;
}
// Check if turn was skipped
if (0 == 1) { // TODO button to skip turn
pawn = null;
waiting = false;
lock.notifyAll();
return;
}
// Check if a destination was chosen
Point.Float t = renderer.unproject(x, y, 0);
t.x -= pawn.getLocation().getX();
t.y -= pawn.getLocation().getY();
if (t.x * t.x + t.y * t.y < 0.2f)
break;
Move move;
if (Math.abs(t.x) > Math.abs(t.y))
move = t.x >= 0 ? Move.East : Move.West;
else
move = t.y >= 0 ? Move.North : Move.South;
action = new Action(pawn, move);
waiting = false;
lock.notifyAll();
pawn = null;
}
}