Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我从维基百科写了一个 Alpha-Beta 修剪。我正在尝试编写一个四连接 AI。该函数应该返回列号,然后我的主函数会移动。
我相信你的问题出在这一行:
if(temp[i][column-1] == '0')
temp是一个整数数组。你应该比较一下0。'0'表示字符 0,Java 将其解释为整数 (48)。无论如何,你应该使用这个:
temp
0
'0'
if(temp[i][column-1] == 0)