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
30bd894d
Commit
30bd894d
authored
Mar 23, 2016
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
environment variables
parent
2241def4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
Program.cs
Program.cs
+5
-9
No files found.
Program.cs
View file @
30bd894d
...
@@ -9,7 +9,7 @@ namespace WindBot
...
@@ -9,7 +9,7 @@ namespace WindBot
{
{
public
class
Program
public
class
Program
{
{
public
const
short
ProVersion
=
0x1338
;
public
static
short
ProVersion
=
Int16
.
Parse
(
Environment
.
GetEnvironmentVariable
(
"YGOPRO_VERSION"
))
;
internal
static
Random
Rand
;
internal
static
Random
Rand
;
...
@@ -40,15 +40,11 @@ namespace WindBot
...
@@ -40,15 +40,11 @@ namespace WindBot
{
{
Init
(
"cards.cdb"
);
Init
(
"cards.cdb"
);
// Start two clients and connect them to the same server. Which deck is gonna win?
GameClient
client
=
new
GameClient
(
Environment
.
GetEnvironmentVariable
(
"YGOPRO_NAME"
),
Environment
.
GetEnvironmentVariable
(
"YGOPRO_DECK"
),
Environment
.
GetEnvironmentVariable
(
"YGOPRO_HOST"
),
Int32
.
Parse
(
Environment
.
GetEnvironmentVariable
(
"YGOPRO_PORT"
)));
GameClient
clientA
=
new
GameClient
(
"Wind"
,
"Horus"
,
"127.0.0.1"
,
7911
);
client
.
Start
();
GameClient
clientB
=
new
GameClient
(
"Fire"
,
"OldSchool"
,
"127.0.0.1"
,
7911
);
while
(
client
.
Connection
.
IsConnected
)
clientA
.
Start
();
clientB
.
Start
();
while
(
clientA
.
Connection
.
IsConnected
||
clientB
.
Connection
.
IsConnected
)
{
{
clientA
.
Tick
();
client
.
Tick
();
clientB
.
Tick
();
Thread
.
Sleep
(
1
);
Thread
.
Sleep
(
1
);
}
}
}
}
...
...
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