Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
l2_boardgame2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
l2_boardgame2
Commits
25a23735
Commit
25a23735
authored
Jul 21, 2022
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整匹配时长和AI能力
parent
ff8b98ce
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
7 deletions
+16
-7
AI.ts
assets/l2_boardgame2/script/AI.ts
+15
-6
Server.ts
assets/l2_boardgame2/script/Server.ts
+1
-1
No files found.
assets/l2_boardgame2/script/AI.ts
View file @
25a23735
...
@@ -49,12 +49,21 @@ export class AI {
...
@@ -49,12 +49,21 @@ export class AI {
//调试加速 2 Math.random() * 3 + 4
//调试加速 2 Math.random() * 3 + 4
await
asyncDelay
(
Math
.
random
()
*
3
+
4
);
await
asyncDelay
(
Math
.
random
()
*
3
+
4
);
const
idx
=
this
.
getNextRightIdx
();
const
idx
=
this
.
getNextRightIdx
();
if
(
Math
.
random
()
<
0.8
)
{
this
.
networkHelper
.
sendFrame
({
this
.
networkHelper
.
sendFrame
({
type
:
"
right
"
,
type
:
"
right
"
,
idx
:
idx
,
idx
:
idx
,
uuid
:
this
.
playerData
.
uuid
,
uuid
:
this
.
playerData
.
uuid
,
color
:
this
.
playerData
.
color
,
color
:
this
.
playerData
.
color
,
});
});
}
else
{
this
.
networkHelper
.
sendFrame
({
type
:
"
wrong
"
,
uuid
:
this
.
playerData
.
uuid
,
color
:
this
.
playerData
.
color
,
});
}
}
}
}
}
}
}
...
...
assets/l2_boardgame2/script/Server.ts
View file @
25a23735
...
@@ -114,7 +114,7 @@ export class GameServer {
...
@@ -114,7 +114,7 @@ export class GameServer {
this
.
addPlayer
(
playerInfo
);
this
.
addPlayer
(
playerInfo
);
}
}
//TODO:调试加速
//TODO:调试加速
},
1000
)
//RandomInt(10000, 15000)
},
1000
0
)
//RandomInt(10000, 15000)
);
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment