Skip to content

Update 1.9.8#3

Open
RedStoneBili wants to merge 2 commits intoXiaokang2022:masterfrom
RedStoneBili:master
Open

Update 1.9.8#3
RedStoneBili wants to merge 2 commits intoXiaokang2022:masterfrom
RedStoneBili:master

Conversation

@RedStoneBili
Copy link
Copy Markdown

1.9.8更新
增加停一手功能及是否开启停一手功能设置
增加AI最大计算时间设置
增加是否优先保将设置
性能优化

增加AI最大计算时间设置
增加是否优先保将设置
性能优化
Python中国象棋🩠🩡🩢🩣🩤🩥🩦🩧🩨🩩🩪🩫🩬🩭
1.9.8更新
增加停一手功能及是否开启停一手功能设置
增加AI最大计算时间设置
增加是否优先保将设置
性能优化
@RedStoneBili RedStoneBili marked this pull request as ready for review June 28, 2025 23:36
Copy link
Copy Markdown
Owner

@Xiaokang2022 Xiaokang2022 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

存在非常多的问题,而且不建议修改该项目中的 tkintertools.py 文件,因为该文件已不再维护,该文件取自项目 tkintertools2.5.9.5 版本,当前该项目已重命名且不再通过该方式引入。

此项目本应该归档,但有时需要进一步修改 AI 的逻辑,主要是修改其中的 cpp 文件,所以仍开放 PR

如果你愿意修改你的 PR,我也愿意进一步帮你看看

mode = None # 当前游戏模式
timer = 0 # 计时判断时间戳
count = 0 # 未吃棋回合计数(和棋判定需要)
count = 0 # 未吃棋回��计数(和棋判定需要)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注释中存在乱码

def help(self, _ind: list[int] = [0]) -> None:
""" 帮助页面 """
def help(self, _ind: list[int] = None) -> None:
""" 帮助页��� """
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docstring 中存在乱码,其它地方也存在该问题,不再重复指出

self.send(msg='OK')
code = self.recv()['msg']
# code 末尾加上当前优先保护将设置
import GUI
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

一个建议:尽量不要在代码中间引入模块

__version__ = '1.9.8'
# 作者
__author__ = '小康2022'
__author__ = '非主刘Non_main_liu'
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你这是什么意思呢?

try:
import GUI
return getattr(GUI.Global, 'protect_king_when_check', config.get('protect_king_when_check', True))
except Exception:
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

一个建议:尽量减少使用 Exception 类,异常的捕获范围太大

Comment on lines +1 to +20
{
"Launch": 47,
"Play": 29,
"First": 14,
"Time": 357,
"LAN": 0,
"LOCAL": 5,
"COMPUTER": 23,
"END": 1,
"TEST": 0,
"Win": 0,
"Lose": 3,
"Peace": 0,
"Eat": 26,
"Move": 0,
"Revoke": 0,
"Recovery": 0,
"Warn": 10,
"AI": 0,
"Skip": 1
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

数据没有清空

CURSOR = '│' # 文本光标
FONT = '楷体', 15 # 默认字体
LIMIT = -1 # 默认文本长度
LIMIT = -1 # 默认文本�����度
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修改这些注释内容有什么意义呢?

`title`: 窗口标题
`width`: 窗口宽度(单位:像素)
`height`: 窗口高度
`height`: 窓口高度
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

错别字

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants