Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
微笑面对bug
ddz
提交
bccd2f07
ddz
项目概览
微笑面对bug
/
ddz
通知
5
Star
2
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ddz
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bccd2f07
编写于
9月 19, 2020
作者:
微笑面对bug
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
AI 延时
上级
e3844a90
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
19 addition
and
6 deletion
+19
-6
src/doudizhu/Player.js
src/doudizhu/Player.js
+19
-6
未找到文件。
src/doudizhu/Player.js
浏览文件 @
bccd2f07
...
@@ -39,12 +39,15 @@ class Player{
...
@@ -39,12 +39,15 @@ class Player{
playByAI
(){
playByAI
(){
let
lastObj
=
this
.
getLastObj
();
let
that
=
this
;
setTimeout
(
function
()
{
let
lastObj
=
that
.
getLastObj
();
if
(
lastObj
){
if
(
lastObj
){
this
.
playByObj
(
lastObj
);
that
.
playByObj
(
lastObj
);
}
else
{
}
else
{
this
.
playByAllType
();
that
.
playByAllType
();
}
}
},
1000
);
}
}
...
@@ -818,11 +821,21 @@ class Player{
...
@@ -818,11 +821,21 @@ class Player{
}
}
playByPokerList
(
pokerList
){
playByPokerList
(
pokerList
){
if
(
this
.
game
.
currentPlayer
!==
this
){
alert
(
'
请等待
'
+
this
.
game
.
currentPlayer
.
name
+
'
出牌
'
);
return
false
;
}
let
list
=
this
.
getListByList
(
pokerList
);
let
list
=
this
.
getListByList
(
pokerList
);
return
this
.
handleList
(
list
);
return
this
.
handleList
(
list
);
}
}
playByString
(
str
){
playByString
(
str
){
if
(
this
.
game
.
currentPlayer
!==
this
){
alert
(
'
请等待
'
+
this
.
game
.
currentPlayer
.
name
+
'
出牌
'
);
return
false
;
}
let
list
=
this
.
getListByString
(
str
);
let
list
=
this
.
getListByString
(
str
);
return
this
.
handleList
(
list
);
return
this
.
handleList
(
list
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录