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
nanahira
windbot
Commits
113aa879
Commit
113aa879
authored
Aug 24, 2018
by
handsomekiwi
Committed by
mercury233
Aug 24, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add select multi position in one chain (#85)
parent
7abb426f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
Game/GameAI.cs
Game/GameAI.cs
+16
-5
No files found.
Game/GameAI.cs
View file @
113aa879
...
...
@@ -92,11 +92,12 @@ namespace WindBot.Game
public
void
OnNewPhase
()
{
m_selector
.
Clear
();
m_position
.
Clear
();
m_selector_pointer
=
-
1
;
m_materialSelector
=
null
;
m_option
=
-
1
;
m_yesno
=
-
1
;
m_position
=
CardPosition
.
FaceUpAttack
;
m_place
=
0
;
if
(
Duel
.
Player
==
0
&&
Duel
.
Phase
==
DuelPhase
.
Draw
)
{
...
...
@@ -508,8 +509,7 @@ namespace WindBot.Game
/// <returns>Selected position.</returns>
public
CardPosition
OnSelectPosition
(
int
cardId
,
IList
<
CardPosition
>
positions
)
{
CardPosition
selector_selected
=
m_position
;
m_position
=
CardPosition
.
FaceUpAttack
;
CardPosition
selector_selected
=
GetSelectedPosition
();
CardPosition
executor_selected
=
Executor
.
OnSelectPosition
(
cardId
,
positions
);
...
...
@@ -747,7 +747,6 @@ namespace WindBot.Game
private
CardSelector
m_materialSelector
;
private
CardPosition
m_position
=
CardPosition
.
FaceUpAttack
;
private
int
m_place
;
private
int
m_option
;
private
int
m_number
;
...
...
@@ -755,6 +754,7 @@ namespace WindBot.Game
private
int
m_yesno
;
private
IList
<
CardAttribute
>
m_attributes
=
new
List
<
CardAttribute
>();
private
IList
<
CardSelector
>
m_selector
=
new
List
<
CardSelector
>();
private
IList
<
CardPosition
>
m_position
=
new
List
<
CardPosition
>();
private
int
m_selector_pointer
=
-
1
;
private
IList
<
CardRace
>
m_races
=
new
List
<
CardRace
>();
...
...
@@ -929,9 +929,20 @@ namespace WindBot.Game
return
selected
;
}
public
CardPosition
GetSelectedPosition
()
{
CardPosition
selected
=
CardPosition
.
FaceUpAttack
;
if
(
m_position
.
Count
>
0
)
{
selected
=
m_position
[
0
];
m_position
.
RemoveAt
(
0
);
}
return
selected
;
}
public
void
SelectPosition
(
CardPosition
pos
)
{
m_position
=
pos
;
m_position
.
Add
(
pos
)
;
}
public
void
SelectPlace
(
int
zones
)
...
...
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