I have tried this problem for a week. It would be trivial to show the board of course but I am too tired after doing this as I am a beginner. Let me check what you have pointed out. However, I am quite sure that the algorithm to find max is correct! Thanks for your help.