Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
W
windbot
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alstroemeria-silentlove
windbot
Commits
40396fbd
Commit
40396fbd
authored
Aug 19, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
0e54b3fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
14 deletions
+4
-14
Game/GameAI.cs
Game/GameAI.cs
+1
-14
Game/GameBehavior.cs
Game/GameBehavior.cs
+3
-0
No files found.
Game/GameAI.cs
View file @
40396fbd
...
@@ -458,18 +458,6 @@ namespace WindBot.Game
...
@@ -458,18 +458,6 @@ namespace WindBot.Game
}
}
}
}
// try all
int
s1
=
0
,
s2
=
0
;
foreach
(
ClientCard
card
in
cards
)
{
s1
+=
card
.
OpParam1
;
s2
+=
(
card
.
OpParam2
!=
0
)
?
card
.
OpParam2
:
card
.
OpParam1
;
}
if
(
s1
>=
sum
||
s2
>=
sum
)
{
return
cards
;
}
// try all combinations
// try all combinations
int
i
=
(
min
<=
1
)
?
2
:
min
;
int
i
=
(
min
<=
1
)
?
2
:
min
;
while
(
i
<=
max
&&
i
<=
cards
.
Count
)
while
(
i
<=
max
&&
i
<=
cards
.
Count
)
...
@@ -479,8 +467,7 @@ namespace WindBot.Game
...
@@ -479,8 +467,7 @@ namespace WindBot.Game
foreach
(
IEnumerable
<
ClientCard
>
combo
in
combos
)
foreach
(
IEnumerable
<
ClientCard
>
combo
in
combos
)
{
{
Logger
.
DebugWriteLine
(
"----"
);
Logger
.
DebugWriteLine
(
"----"
);
s1
=
0
;
int
s1
=
0
,
s2
=
0
;
s2
=
0
;
foreach
(
ClientCard
card
in
combo
)
foreach
(
ClientCard
card
in
combo
)
{
{
s1
+=
card
.
OpParam1
;
s1
+=
card
.
OpParam1
;
...
...
Game/GameBehavior.cs
View file @
40396fbd
...
@@ -979,6 +979,9 @@ namespace WindBot.Game
...
@@ -979,6 +979,9 @@ namespace WindBot.Game
int
sumval
=
packet
.
ReadInt32
();
int
sumval
=
packet
.
ReadInt32
();
int
min
=
packet
.
ReadByte
();
int
min
=
packet
.
ReadByte
();
int
max
=
packet
.
ReadByte
();
int
max
=
packet
.
ReadByte
();
if
(
max
<=
0
)
max
=
99
;
IList
<
ClientCard
>
mandatoryCards
=
new
List
<
ClientCard
>();
IList
<
ClientCard
>
mandatoryCards
=
new
List
<
ClientCard
>();
IList
<
ClientCard
>
cards
=
new
List
<
ClientCard
>();
IList
<
ClientCard
>
cards
=
new
List
<
ClientCard
>();
...
...
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