public void printOptimalPath(Deal g) {
Node move = getBestMove();
if (move == this) {
for (int moveIdx : getMoves()) {
Trick currentTrick = g.getCurrentTrick();
System.out.println(g.getNextToPlay() + ": "
+ g.getNextToPlay().getPossibleMoves(currentTrick).get(moveIdx));
g.doNextCard(moveIdx);
if (currentTrick.isDone()) {
System.out.println(" Trick taken by " + g.getPlayer(g.getWinnerIndex(currentTrick)));
}
}
} else {
move.printOptimalPath(g);