Since this would not work properly with moving pieces by clicking on the destination first, I removed that capability. It will now only show where the piece clicked on can move to. It will no longer show which pieces can move to a particular space.
I have restored that ability, and I enhanced the ability to quickly make moves. I renamed the old showLegal() function to showAllLegal(), and I renamed the new one to showNextLegal(). As these names suggest, showNextLegal does not always show as many legal moves as showAllLegal() does. Since showNextLegal() applies clicks in order, it may exclude moves that showAllLegal(), which does not apply clicks in order, would not exclude. Because showAllLegal() returns all possible moves involving a space, it can be used to determine if there is only one legal move involving that space. This allows Game Courier to play a move right away when it determines that there is only one legal move involving the space clicked on. This now works for enemy pieces as well as empty space. But it will not work when you click on one of your own pieces to see its legal moves. In that case, it will display the legal moves even if there is only one, and it will not play the move automatically.
I have restored that ability, and I enhanced the ability to quickly make moves. I renamed the old showLegal() function to showAllLegal(), and I renamed the new one to showNextLegal(). As these names suggest, showNextLegal does not always show as many legal moves as showAllLegal() does. Since showNextLegal() applies clicks in order, it may exclude moves that showAllLegal(), which does not apply clicks in order, would not exclude. Because showAllLegal() returns all possible moves involving a space, it can be used to determine if there is only one legal move involving that space. This allows Game Courier to play a move right away when it determines that there is only one legal move involving the space clicked on. This now works for enemy pieces as well as empty space. But it will not work when you click on one of your own pieces to see its legal moves. In that case, it will display the legal moves even if there is only one, and it will not play the move automatically.