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
HiiragiGuardians
windbot
Commits
966ea6bc
Commit
966ea6bc
authored
Oct 29, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add MSG_ANNOUNCE_CARD_FILTER and MSG_ROCK_PAPER_SCISSORS
parent
d9a9b49a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
Game/GameBehavior.cs
Game/GameBehavior.cs
+14
-0
No files found.
Game/GameBehavior.cs
View file @
966ea6bc
...
@@ -118,6 +118,8 @@ namespace WindBot.Game
...
@@ -118,6 +118,8 @@ namespace WindBot.Game
_messages
.
Add
(
GameMessage
.
AnnounceCard
,
OnAnnounceCard
);
_messages
.
Add
(
GameMessage
.
AnnounceCard
,
OnAnnounceCard
);
_messages
.
Add
(
GameMessage
.
AnnounceNumber
,
OnAnnounceNumber
);
_messages
.
Add
(
GameMessage
.
AnnounceNumber
,
OnAnnounceNumber
);
_messages
.
Add
(
GameMessage
.
AnnounceRace
,
OnAnnounceRace
);
_messages
.
Add
(
GameMessage
.
AnnounceRace
,
OnAnnounceRace
);
_messages
.
Add
(
GameMessage
.
AnnounceCardFilter
,
OnAnnounceCard
);
_messages
.
Add
(
GameMessage
.
RockPaperScissors
,
OnRockPaperScissors
);
}
}
private
void
OnJoinGame
(
BinaryReader
packet
)
private
void
OnJoinGame
(
BinaryReader
packet
)
...
@@ -1085,6 +1087,7 @@ namespace WindBot.Game
...
@@ -1085,6 +1087,7 @@ namespace WindBot.Game
private
void
OnAnnounceCard
(
BinaryReader
packet
)
private
void
OnAnnounceCard
(
BinaryReader
packet
)
{
{
// not fully implemented
Connection
.
Send
(
CtosMessage
.
Response
,
_ai
.
OnAnnounceCard
());
Connection
.
Send
(
CtosMessage
.
Response
,
_ai
.
OnAnnounceCard
());
}
}
...
@@ -1117,5 +1120,16 @@ namespace WindBot.Game
...
@@ -1117,5 +1120,16 @@ namespace WindBot.Game
reply
+=
(
int
)
races
[
i
];
reply
+=
(
int
)
races
[
i
];
Connection
.
Send
(
CtosMessage
.
Response
,
reply
);
Connection
.
Send
(
CtosMessage
.
Response
,
reply
);
}
}
private
void
OnRockPaperScissors
(
BinaryReader
packet
)
{
packet
.
ReadByte
();
// player
int
result
;
if
(
_hand
>
0
)
result
=
_hand
;
else
result
=
_ai
.
OnRockPaperScissors
();
Connection
.
Send
(
CtosMessage
.
Response
,
result
);
}
}
}
}
}
\ No newline at end of file
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