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
xiaoye
windbot
Commits
d4f000e6
Commit
d4f000e6
authored
Nov 06, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge
https://github.com/IceYGO/windbot
parents
b94542d3
5863d122
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
56 additions
and
36 deletions
+56
-36
Game/GameAI.cs
Game/GameAI.cs
+2
-2
Game/GameBehavior.cs
Game/GameBehavior.cs
+1
-2
LICENSE
LICENSE
+21
-0
Properties/AssemblyInfo.cs
Properties/AssemblyInfo.cs
+3
-3
README.md
README.md
+1
-1
WindBotInfo.cs
WindBotInfo.cs
+28
-28
No files found.
Game/GameAI.cs
View file @
d4f000e6
...
@@ -522,7 +522,7 @@ namespace WindBot.Game
...
@@ -522,7 +522,7 @@ namespace WindBot.Game
public
bool
OnSelectYesNo
(
int
desc
)
public
bool
OnSelectYesNo
(
int
desc
)
{
{
if
(
m_yesno
!=
-
1
)
if
(
m_yesno
!=
-
1
)
return
m_yesno
>
0
;
return
m_yesno
>
0
;
return
Executor
.
OnSelectYesNo
(
desc
);
return
Executor
.
OnSelectYesNo
(
desc
);
}
}
...
@@ -691,7 +691,7 @@ namespace WindBot.Game
...
@@ -691,7 +691,7 @@ namespace WindBot.Game
public
void
SelectYesNo
(
bool
opt
)
public
void
SelectYesNo
(
bool
opt
)
{
{
m_yesno
=
opt
?
1
:
0
;
m_yesno
=
opt
?
1
:
0
;
}
}
/// <summary>
/// <summary>
...
...
Game/GameBehavior.cs
View file @
d4f000e6
...
@@ -351,7 +351,6 @@ namespace WindBot.Game
...
@@ -351,7 +351,6 @@ namespace WindBot.Game
private
void
OnTagSwap
(
BinaryReader
packet
)
private
void
OnTagSwap
(
BinaryReader
packet
)
{
{
int
player
=
GetLocalPlayer
(
packet
.
ReadByte
());
int
player
=
GetLocalPlayer
(
packet
.
ReadByte
());
//Logger.DebugWriteLine("swap " + player);
int
mcount
=
packet
.
ReadByte
();
int
mcount
=
packet
.
ReadByte
();
int
ecount
=
packet
.
ReadByte
();
int
ecount
=
packet
.
ReadByte
();
/*int pcount = */
packet
.
ReadByte
();
/*int pcount = */
packet
.
ReadByte
();
...
@@ -768,7 +767,7 @@ namespace WindBot.Game
...
@@ -768,7 +767,7 @@ namespace WindBot.Game
}
}
IList
<
int
>
used
=
_ai
.
OnSelectCounter
(
type
,
quantity
,
cards
,
counters
);
IList
<
int
>
used
=
_ai
.
OnSelectCounter
(
type
,
quantity
,
cards
,
counters
);
byte
[]
result
=
new
byte
[
used
.
Count
*
2
];
byte
[]
result
=
new
byte
[
used
.
Count
*
2
];
for
(
int
i
=
0
;
i
<
used
.
Count
;
++
i
)
for
(
int
i
=
0
;
i
<
used
.
Count
;
++
i
)
{
{
result
[
i
*
2
]
=
(
byte
)(
used
[
i
]
&
0xff
);
result
[
i
*
2
]
=
(
byte
)(
used
[
i
]
&
0xff
);
...
...
LICENSE
0 → 100644
View file @
d4f000e6
The MIT License (MIT)
Copyright (c) 2015-2017 IceYGO
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Properties/AssemblyInfo.cs
View file @
d4f000e6
...
@@ -6,11 +6,11 @@ using System.Runtime.InteropServices;
...
@@ -6,11 +6,11 @@ using System.Runtime.InteropServices;
// set of attributes. Change these attribute values to modify the information
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
// associated with an assembly.
[
assembly
:
AssemblyTitle
(
"WindBot"
)]
[
assembly
:
AssemblyTitle
(
"WindBot"
)]
[
assembly
:
AssemblyDescription
(
"A C# bot for
ygopro, compatible with ygosharp
."
)]
[
assembly
:
AssemblyDescription
(
"A C# bot for
YGOPro
."
)]
[
assembly
:
AssemblyConfiguration
(
""
)]
[
assembly
:
AssemblyConfiguration
(
""
)]
[
assembly
:
AssemblyCompany
(
"Ice"
)]
[
assembly
:
AssemblyCompany
(
"Ice
YGO
"
)]
[
assembly
:
AssemblyProduct
(
"WindBot"
)]
[
assembly
:
AssemblyProduct
(
"WindBot"
)]
[
assembly
:
AssemblyCopyright
(
"Copyright © Ice
2015
"
)]
[
assembly
:
AssemblyCopyright
(
"Copyright © Ice
YGO 2015-2017
"
)]
[
assembly
:
AssemblyTrademark
(
""
)]
[
assembly
:
AssemblyTrademark
(
""
)]
[
assembly
:
AssemblyCulture
(
""
)]
[
assembly
:
AssemblyCulture
(
""
)]
...
...
README.md
View file @
d4f000e6
# WindBot
# WindBot
A C# bot for
ygop
ro, compatible with the
[
YGOSharp
](
https://github.com/IceYGO/ygosharp
)
and
[
SRVPro
](
https://github.com/moecube/srvpro
)
server.
A C# bot for
YGOP
ro, compatible with the
[
YGOSharp
](
https://github.com/IceYGO/ygosharp
)
and
[
SRVPro
](
https://github.com/moecube/srvpro
)
server.
### How to use:
### How to use:
...
...
WindBotInfo.cs
View file @
d4f000e6
using
System
;
using
System
;
namespace
WindBot
namespace
WindBot
{
{
public
class
WindBotInfo
public
class
WindBotInfo
{
{
public
string
Name
{
get
;
set
;
}
public
string
Name
{
get
;
set
;
}
public
string
Deck
{
get
;
set
;
}
public
string
Deck
{
get
;
set
;
}
public
string
Dialog
{
get
;
set
;
}
public
string
Dialog
{
get
;
set
;
}
public
string
Host
{
get
;
set
;
}
public
string
Host
{
get
;
set
;
}
public
int
Port
{
get
;
set
;
}
public
int
Port
{
get
;
set
;
}
public
string
HostInfo
{
get
;
set
;
}
public
string
HostInfo
{
get
;
set
;
}
public
int
Version
{
get
;
set
;
}
public
int
Version
{
get
;
set
;
}
public
int
Hand
{
get
;
set
;
}
public
int
Hand
{
get
;
set
;
}
public
WindBotInfo
()
public
WindBotInfo
()
{
{
Name
=
"WindBot"
;
Name
=
"WindBot"
;
Deck
=
null
;
Deck
=
null
;
Dialog
=
"default"
;
Dialog
=
"default"
;
Host
=
"127.0.0.1"
;
Host
=
"127.0.0.1"
;
Port
=
7911
;
Port
=
7911
;
HostInfo
=
""
;
HostInfo
=
""
;
Version
=
0x
233C
;
Version
=
0x
1340
;
Hand
=
0
;
Hand
=
0
;
}
}
}
}
}
}
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