XMuli / ChineseChess

Cross-platform and online battle platform game based on Qt: Chinese Chess. Also known as:『Xiangqi』『中国象棋』
https://www.bilibili.com/video/av45509758
GNU General Public License v3.0
709 stars 186 forks source link

AI无效 #23

Closed yjmthu closed 2 years ago

yjmthu commented 2 years ago

用Qt6编译后玩家和AI对战模式下, AI不会自动走子, 效果和玩家自己对战一样.

XMuli commented 2 years ago

我暂时还没有 Qt 6 version 的环境。 方便的话可以帮看看是调试怎么说?

yjmthu commented 2 years ago

可能是红黑方之间的切换的判断有问题, 红方下了黑方不动, 但是鼠标可以操控黑方.

XMuli commented 2 years ago

运行了一下,当前 Qt 5 环境无此问题。应该不是待后面升级到 Qt 6 时候我调试一番。猜测一波应该是个某处赋初值的小问题?

yjmthu commented 2 years ago

谢谢, 也可能是我对代码做了一些小改动造成的(为了适应Qt6), 我先仔细检查一下, 顺便学习学习.

XMuli commented 2 years ago
        你 clone 后【直接】用 qmake 先打开运行试试效果是否符合预期🤣🤣---- 回复的原邮件 ***@***.***>发送日期2021年12月07日 23:39 ***@***.***> ***@***.******@***.***>主题Re: [xmuli/chinessChess] AI无效 (Issue #23)

谢谢, 也可能是我对代码做了一些小改动造成的(为了适应Qt6), 我先仔细检查一下, 顺便学习学习.

—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or unsubscribe.Triage notifications on the go with GitHub Mobile for iOS or Android.

[

{

@.***": "http://schema.org",

@.***": "EmailMessage",

"potentialAction": {

@.***": "ViewAction",

"target": "https://github.com/xmuli/chinessChess/issues/23#issuecomment-988042492",

"url": "https://github.com/xmuli/chinessChess/issues/23#issuecomment-988042492",

"name": "View Issue"

},

"description": "View this Issue on GitHub",

"publisher": {

@.***": "Organization",

"name": "GitHub",

"url": "https://github.com"

}

}

]

yjmthu commented 2 years ago

有些模块(比如QSound)Qt6里面没有, 不能直接编译

yjmthu commented 2 years ago

找到bug位置了, 错误处图片 在Qt6里面, 这里要转换一下

    if(!isChecked(getRealPoint(ev->pos()), row, col))
        return;

一直调试到现在, bug藏得真深啊.

XMuli commented 2 years ago

看了下消息时间,辛苦辛苦。定位出 BUG 所在,大佬可以代码相应位置标记一下 TODO 的、或提交 PR 的ヾ(≧▽≦*)o

yjmthu commented 2 years ago

菜鸡新手一个, 不是大佬. 对这个项目我还不熟悉, 我先消化一下代码. 感谢码主开源分享.