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
c9f067da
Commit
c9f067da
authored
Jan 17, 2016
by
IceYGO
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the public Program.Init function
parent
bb40ca78
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
Program.cs
Program.cs
+12
-7
No files found.
Program.cs
View file @
c9f067da
...
@@ -11,9 +11,9 @@ namespace WindBot
...
@@ -11,9 +11,9 @@ namespace WindBot
{
{
public
const
short
ProVersion
=
0x1338
;
public
const
short
ProVersion
=
0x1338
;
public
static
Random
Rand
;
internal
static
Random
Rand
;
public
static
void
Main
()
internal
static
void
Main
()
{
{
#if !DEBUG
#if !DEBUG
try
try
...
@@ -29,11 +29,16 @@ namespace WindBot
...
@@ -29,11 +29,16 @@ namespace WindBot
#endif
#endif
}
}
p
rivate
static
void
Run
(
)
p
ublic
static
void
Init
(
string
databasePath
)
{
{
Rand
=
new
Random
();
Rand
=
new
Random
();
DecksManager
.
Init
();
DecksManager
.
Init
();
InitCardsManager
();
InitCardsManager
(
databasePath
);
}
private
static
void
Run
()
{
Init
(
"cards.cdb"
);
// Start two clients and connect them to the same server. Which deck is gonna win?
// Start two clients and connect them to the same server. Which deck is gonna win?
GameClient
clientA
=
new
GameClient
(
"Wind"
,
"Horus"
,
"127.0.0.1"
,
7911
);
GameClient
clientA
=
new
GameClient
(
"Wind"
,
"Horus"
,
"127.0.0.1"
,
7911
);
...
@@ -48,10 +53,10 @@ namespace WindBot
...
@@ -48,10 +53,10 @@ namespace WindBot
}
}
}
}
private
static
void
InitCardsManager
()
private
static
void
InitCardsManager
(
string
databasePath
)
{
{
string
currentPath
=
Path
.
GetFullPath
(
"."
);
string
currentPath
=
Path
.
GetFullPath
(
"."
);
string
absolutePath
=
Path
.
Combine
(
currentPath
,
"cards.cdb"
);
string
absolutePath
=
Path
.
Combine
(
currentPath
,
databasePath
);
NamedCardsManager
.
Init
(
absolutePath
);
NamedCardsManager
.
Init
(
absolutePath
);
}
}
}
}
...
...
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