🕸Fergus Duniho wrote on Thu, May 28, 2020 02:36 AM UTC:
Perhaps because Shogi has Black move before White, something got mixed up in how drops work, and the first array in $starpath is for the second player. So, switching the two values in the $starpath array fixes this problem.
But then you have a new problem. When you allow multiple moves on the same turn, you have to treat them individually. This normally involves rolling back the moves, then doing one at a time, checking the legality of each move individually before doing the next one. See my code for Extra Move Chess or Marseillais Chess for examples.
Perhaps because Shogi has Black move before White, something got mixed up in how drops work, and the first array in $starpath is for the second player. So, switching the two values in the $starpath array fixes this problem.
But then you have a new problem. When you allow multiple moves on the same turn, you have to treat them individually. This normally involves rolling back the moves, then doing one at a time, checking the legality of each move individually before doing the next one. See my code for Extra Move Chess or Marseillais Chess for examples.