Skip to content

Commit

Permalink
gameevents MWからファウル情報を送信する #14
Browse files Browse the repository at this point in the history
  • Loading branch information
asoyusaku committed Apr 22, 2024
1 parent 2c88ceb commit 9686941
Show file tree
Hide file tree
Showing 3 changed files with 297 additions and 263 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -1282,13 +1282,15 @@ func createRefInfo(ourteam int) *pb_gen.Referee_Info {
var next_command *pb_gen.Referee_Info_Command
var bpX float32
var bpY float32
var gameevent []*pb_gen.GameEvent

if ref_command != nil {
command = (*pb_gen.Referee_Info_Command)(ref_command.Command)
stage = (*pb_gen.Referee_Info_Stage)(ref_command.Stage)
next_command = (*pb_gen.Referee_Info_Command)(ref_command.NextCommand)
bpX = ref_command.GetDesignatedPosition().GetX()
bpY = ref_command.GetDesignatedPosition().GetY()
gameevent = ref_command.GetGameEvents()
if ourteam == 0 {
yellowcards = ref_command.Blue.GetYellowCards()
redcards = ref_command.Blue.GetRedCards()
Expand All @@ -1313,6 +1315,7 @@ func createRefInfo(ourteam int) *pb_gen.Referee_Info {
TeaminfoTheir: teaminfo_their,
YellowCards: &yellowcards,
RedCards: &redcards,
Event: gameevent,
PreCommand: last_command,
NextCommand: next_command,
BallPlacementX: &bpX,
Expand Down
Loading

0 comments on commit 9686941

Please sign in to comment.