コード例 #1
0
ファイル: DebugProperty.cs プロジェクト: unsegnor/robocode
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, Object obje)
            {
                var obj = (DebugProperty) obje;

                serializer.serialize(buffer, obj.key);
                serializer.serialize(buffer, obj.value);
            }
コード例 #2
0
ファイル: BattleEndedEvent.cs プロジェクト: ziqew/robocode
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (BattleEndedEvent)objec;

                serializer.serialize(buffer, obj.aborted);
                serializer.serialize(buffer, RbSerializerN.BattleResults_TYPE, obj.results);
            }
コード例 #3
0
ファイル: DebugProperty.cs プロジェクト: khangnguyen/robocode
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, Object obje)
            {
                var obj = (DebugProperty) obje;

                serializer.serialize(buffer, obj.key);
                serializer.serialize(buffer, obj.value);
            }
コード例 #4
0
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (HitByBulletEvent)objec;

                serializer.serialize(buffer, RbSerializerN.Bullet_TYPE, obj.bullet);
                serializer.serialize(buffer, obj.bearing);
            }
コード例 #5
0
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, Object obje)
            {
                var obj = (TeamMessage)obje;

                serializer.serialize(buffer, obj.sender);
                serializer.serialize(buffer, obj.recipient);
                serializer.serialize(buffer, obj.message);
            }
コード例 #6
0
ファイル: TeamMessage.cs プロジェクト: jaros/robocode
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, Object obje)
            {
                var obj = (TeamMessage) obje;

                serializer.serialize(buffer, obj.sender);
                serializer.serialize(buffer, obj.recipient);
                serializer.serialize(buffer, obj.message);
            }
コード例 #7
0
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (BulletHitEvent)objec;

                serializer.serialize(buffer, obj.bullet.getBulletId());
                serializer.serialize(buffer, obj.name);
                serializer.serialize(buffer, obj.energy);
            }
コード例 #8
0
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (BulletHitBulletEvent)objec;

                // no need to transmit whole bullet, rest of it is already known to proxy side
                serializer.serialize(buffer, obj.bullet.getBulletId());
                serializer.serialize(buffer, RbSerializerN.Bullet_TYPE, obj.hitBullet);
            }
コード例 #9
0
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, Object obje)
            {
                RoundEndedEvent evnt = (RoundEndedEvent)obje;

                serializer.serialize(buffer, evnt.round);
                serializer.serialize(buffer, evnt.turns);
                serializer.serialize(buffer, evnt.totalTurns);
            }
コード例 #10
0
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, Object obje)
            {
                var obj = (BulletCommand)obje;

                serializer.serialize(buffer, obj.power);
                serializer.serialize(buffer, obj.fireAssistValid);
                serializer.serialize(buffer, obj.fireAssistAngle);
                serializer.serialize(buffer, obj.bulletId);
            }
コード例 #11
0
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (HitRobotEvent)objec;

                serializer.serialize(buffer, obj.name);
                serializer.serialize(buffer, obj.bearing);
                serializer.serialize(buffer, obj.energy);
                serializer.serialize(buffer, obj.atFault);
            }
コード例 #12
0
ファイル: BulletCommand.cs プロジェクト: markthor/robocode
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, Object obje)
            {
                var obj = (BulletCommand) obje;

                serializer.serialize(buffer, obj.power);
                serializer.serialize(buffer, obj.fireAssistValid);
                serializer.serialize(buffer, obj.fireAssistAngle);
                serializer.serialize(buffer, obj.bulletId);
            }
コード例 #13
0
ファイル: BulletStatus.cs プロジェクト: boosheng/robocode
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, Object obje)
            {
                var obj = (BulletStatus)obje;

                serializer.serialize(buffer, obj.bulletId);
                serializer.serialize(buffer, obj.victimName);
                serializer.serialize(buffer, obj.isActive);
                serializer.serialize(buffer, obj.x);
                serializer.serialize(buffer, obj.y);
            }
コード例 #14
0
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, Object obje)
            {
                var obj = (BulletStatus) obje;

                serializer.serialize(buffer, obj.bulletId);
                serializer.serialize(buffer, obj.victimName);
                serializer.serialize(buffer, obj.isActive);
                serializer.serialize(buffer, obj.x);
                serializer.serialize(buffer, obj.y);
            }
コード例 #15
0
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (KeyReleasedEvent) objec;

                serializer.serialize(buffer, obj.KeyChar);
                serializer.serialize(buffer, obj.KeyCode);
                serializer.serialize(buffer, obj.KeyLocation);
                serializer.serialize(buffer, obj.ID);
                serializer.serialize(buffer, obj.ModifiersEx);
                serializer.serialize(buffer, obj.When);
            }
コード例 #16
0
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (MouseClickedEvent) objec;

                serializer.serialize(buffer, obj.Button);
                serializer.serialize(buffer, obj.ClickCount);
                serializer.serialize(buffer, obj.X);
                serializer.serialize(buffer, obj.Y);
                serializer.serialize(buffer, obj.ID);
                serializer.serialize(buffer, obj.ModifiersEx);
                serializer.serialize(buffer, obj.When);
            }
コード例 #17
0
ファイル: ExecResults.cs プロジェクト: zhuzeyu22/robocode
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, Object obje)
            {
                var obj = (ExecResults)obje;

                serializer.serialize(buffer, obj.halt);
                serializer.serialize(buffer, obj.shouldWait);
                serializer.serialize(buffer, obj.paintEnabled);

                serializer.serialize(buffer, RbSerializerN.ExecCommands_TYPE, obj.commands);
                serializer.serialize(buffer, RbSerializerN.RobotStatus_TYPE, obj.status);

                foreach (Event evnt in obj.events)
                {
                    serializer.serialize(buffer, evnt);
                }
                buffer.put(RbSerializerN.TERMINATOR_TYPE);
                foreach (TeamMessage message in obj.teamMessages)
                {
                    serializer.serialize(buffer, RbSerializerN.TeamMessage_TYPE, message);
                }
                buffer.put(RbSerializerN.TERMINATOR_TYPE);
                foreach (BulletStatus bulletStatus in obj.bulletUpdates)
                {
                    serializer.serialize(buffer, RbSerializerN.BulletStatus_TYPE, bulletStatus);
                }
                buffer.put(RbSerializerN.TERMINATOR_TYPE);
            }
コード例 #18
0
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (MouseWheelMovedEvent)objec;

                serializer.serialize(buffer, obj.ClickCount);
                serializer.serialize(buffer, obj.X);
                serializer.serialize(buffer, obj.Y);
                serializer.serialize(buffer, obj.ScrollType);
                serializer.serialize(buffer, obj.ScrollAmount);
                serializer.serialize(buffer, obj.WheelRotation);
                serializer.serialize(buffer, obj.ID);
                serializer.serialize(buffer, obj.ModifiersEx);
                serializer.serialize(buffer, obj.When);
            }
コード例 #19
0
ファイル: Bullet.cs プロジェクト: EamonnACI/ACI-SpaceRace
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (Bullet)objec;

                serializer.serialize(buffer, obj.headingRadians);
                serializer.serialize(buffer, obj.x);
                serializer.serialize(buffer, obj.y);
                serializer.serialize(buffer, obj.power);
                serializer.serialize(buffer, obj.ownerName);
                serializer.serialize(buffer, obj.victimName);
                serializer.serialize(buffer, obj._isActive);
                serializer.serialize(buffer, obj.bulletId);
            }
コード例 #20
0
ファイル: MouseEnteredEvent.cs プロジェクト: zhi3/robocode
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (MouseEnteredEvent)objec;

                serializer.serialize(buffer, obj.Button);
                serializer.serialize(buffer, obj.ClickCount);
                serializer.serialize(buffer, obj.X);
                serializer.serialize(buffer, obj.Y);
                serializer.serialize(buffer, obj.ID);
                serializer.serialize(buffer, obj.ModifiersEx);
                serializer.serialize(buffer, obj.When);
            }
コード例 #21
0
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (ScannedRobotEvent)objec;

                serializer.serialize(buffer, obj.name);
                serializer.serialize(buffer, obj.energy);
                serializer.serialize(buffer, obj.heading);
                serializer.serialize(buffer, obj.bearing);
                serializer.serialize(buffer, obj.distance);
                serializer.serialize(buffer, obj.velocity);
                serializer.serialize(buffer, obj.isSentryRobot);
            }
コード例 #22
0
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (KeyTypedEvent)objec;

                serializer.serialize(buffer, obj.KeyChar);
                serializer.serialize(buffer, obj.KeyCode);
                serializer.serialize(buffer, obj.KeyLocation);
                serializer.serialize(buffer, obj.ID);
                serializer.serialize(buffer, obj.ModifiersEx);
                serializer.serialize(buffer, obj.When);
            }
コード例 #23
0
ファイル: RobotStatics.cs プロジェクト: Inzaghi2012/robocode
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object obje)
            {
                var obj = (RobotStatics) obje;

                serializer.serialize(buffer, obj.robocodeVersion);
                serializer.serialize(buffer, obj.isJuniorRobot);
                serializer.serialize(buffer, obj.isInteractiveRobot);
                serializer.serialize(buffer, obj.isPaintRobot);
                serializer.serialize(buffer, obj.isAdvancedRobot);
                serializer.serialize(buffer, obj.isTeamRobot);
                serializer.serialize(buffer, obj.isTeamLeader);
                serializer.serialize(buffer, obj.isDroid);
                serializer.serialize(buffer, obj.isSentryRobot);
                serializer.serialize(buffer, obj.name);
                serializer.serialize(buffer, obj.shortName);
                serializer.serialize(buffer, obj.veryShortName);
                serializer.serialize(buffer, obj.fullClassName);
                serializer.serialize(buffer, obj.shortClassName);
                serializer.serialize(buffer, obj.battleRules.BattlefieldWidth);
                serializer.serialize(buffer, obj.battleRules.BattlefieldHeight);
                serializer.serialize(buffer, obj.battleRules.NumRounds);
                serializer.serialize(buffer, obj.battleRules.GunCoolingRate);
                serializer.serialize(buffer, obj.battleRules.InactivityTime);
                serializer.serialize(buffer, obj.battleRules.HideEnemyNames);
                serializer.serialize(buffer, obj.battleRules.SentryBorderSize);
                if (obj.teammates != null)
                {
                    foreach (string mate in obj.teammates)
                    {
                        serializer.serialize(buffer, mate);
                    }
                }
                buffer.putInt(-1);
                serializer.serialize(buffer, obj.teamName);
                serializer.serialize(buffer, obj.index);
                serializer.serialize(buffer, obj.contestantIndex);
            }
コード例 #24
0
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (BulletHitBulletEvent) objec;

                // no need to transmit whole bullet, rest of it is already known to proxy side
                serializer.serialize(buffer, obj.bullet.getBulletId());
                serializer.serialize(buffer, RbSerializerN.Bullet_TYPE, obj.hitBullet);
            }
コード例 #25
0
ファイル: ExecCommands.cs プロジェクト: yrojha4ever/robocode
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, Object obje)
            {
                var obj = (ExecCommands)obje;

                serializer.serialize(buffer, obj.bodyTurnRemaining);
                serializer.serialize(buffer, obj.radarTurnRemaining);
                serializer.serialize(buffer, obj.gunTurnRemaining);
                serializer.serialize(buffer, obj.distanceRemaining);

                serializer.serialize(buffer, obj.isAdjustGunForBodyTurn);
                serializer.serialize(buffer, obj.isAdjustRadarForGunTurn);
                serializer.serialize(buffer, obj.isAdjustRadarForBodyTurn);
                serializer.serialize(buffer, obj.isAdjustRadarForBodyTurnSet);

                serializer.serialize(buffer, obj.bodyColor);
                serializer.serialize(buffer, obj.gunColor);
                serializer.serialize(buffer, obj.radarColor);
                serializer.serialize(buffer, obj.scanColor);
                serializer.serialize(buffer, obj.bulletColor);

                serializer.serialize(buffer, obj.maxTurnRate);
                serializer.serialize(buffer, obj.maxVelocity);

                serializer.serialize(buffer, obj.moved);
                serializer.serialize(buffer, obj.scan);
                serializer.serialize(buffer, obj.isIORobot);
                serializer.serialize(buffer, obj.isTryingToPaint);

                serializer.serialize(buffer, obj.outputText);

                serializer.serialize(buffer, obj.graphicsCalls);

                foreach (BulletCommand bullet in obj.bullets)
                {
                    serializer.serialize(buffer, RbSerializerN.BulletCommand_TYPE, bullet);
                }
                buffer.put(RbSerializerN.TERMINATOR_TYPE);
                foreach (TeamMessage message in obj.teamMessages)
                {
                    serializer.serialize(buffer, RbSerializerN.TeamMessage_TYPE, message);
                }
                buffer.put(RbSerializerN.TERMINATOR_TYPE);
                foreach (DebugProperty prop in obj.debugProperties)
                {
                    serializer.serialize(buffer, RbSerializerN.DebugProperty_TYPE, prop);
                }
                buffer.put(RbSerializerN.TERMINATOR_TYPE);
            }
コード例 #26
0
ファイル: RobotDeathEvent.cs プロジェクト: zhi3/robocode
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (RobotDeathEvent)objec;

                serializer.serialize(buffer, obj.robotName);
            }
コード例 #27
0
ファイル: RobotStatics.cs プロジェクト: tomgi/robocode
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object obje)
            {
                var obj = (RobotStatics)obje;

                serializer.serialize(buffer, obj.isJuniorRobot);
                serializer.serialize(buffer, obj.isInteractiveRobot);
                serializer.serialize(buffer, obj.isPaintRobot);
                serializer.serialize(buffer, obj.isAdvancedRobot);
                serializer.serialize(buffer, obj.isTeamRobot);
                serializer.serialize(buffer, obj.isTeamLeader);
                serializer.serialize(buffer, obj.isDroid);
                serializer.serialize(buffer, obj.name);
                serializer.serialize(buffer, obj.shortName);
                serializer.serialize(buffer, obj.veryShortName);
                serializer.serialize(buffer, obj.fullClassName);
                serializer.serialize(buffer, obj.shortClassName);
                serializer.serialize(buffer, obj.battleRules.BattlefieldWidth);
                serializer.serialize(buffer, obj.battleRules.BattlefieldHeight);
                serializer.serialize(buffer, obj.battleRules.NumRounds);
                serializer.serialize(buffer, obj.battleRules.GunCoolingRate);
                serializer.serialize(buffer, obj.battleRules.InactivityTime);
                if (obj.teammates != null)
                {
                    foreach (string mate in obj.teammates)
                    {
                        serializer.serialize(buffer, mate);
                    }
                }
                buffer.putInt(-1);
                serializer.serialize(buffer, obj.teamName);
                serializer.serialize(buffer, obj.index);
                serializer.serialize(buffer, obj.contestantIndex);
            }
コード例 #28
0
ファイル: HitByBulletEvent.cs プロジェクト: markthor/robocode
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (HitByBulletEvent) objec;

                serializer.serialize(buffer, RbSerializerN.Bullet_TYPE, obj.bullet);
                serializer.serialize(buffer, obj.bearing);
            }
コード例 #29
0
ファイル: SkippedTurnEvent.cs プロジェクト: markthor/robocode
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (SkippedTurnEvent)objec;

                serializer.serialize(buffer, obj.skippedTurn);
            }
コード例 #30
0
ファイル: HitWallEvent.cs プロジェクト: boosheng/robocode
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (HitWallEvent)objec;

                serializer.serialize(buffer, obj.bearing);
            }
コード例 #31
0
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, Object obje)
            {
                RoundEndedEvent evnt = (RoundEndedEvent) obje;

                serializer.serialize(buffer, evnt.round);
                serializer.serialize(buffer, evnt.turns);
                serializer.serialize(buffer, evnt.totalTurns);
            }
コード例 #32
0
ファイル: Bullet.cs プロジェクト: vodkhang/RoboCode-Robots
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (Bullet) objec;

                serializer.serialize(buffer, obj.headingRadians);
                serializer.serialize(buffer, obj.x);
                serializer.serialize(buffer, obj.y);
                serializer.serialize(buffer, obj.power);
                serializer.serialize(buffer, obj.ownerName);
                serializer.serialize(buffer, obj.victimName);
                serializer.serialize(buffer, obj._isActive);
            }
コード例 #33
0
ファイル: RobotDeathEvent.cs プロジェクト: hgzapata/robocode
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (RobotDeathEvent) objec;

                serializer.serialize(buffer, obj.robotName);
            }
コード例 #34
0
ファイル: BattleEndedEvent.cs プロジェクト: Chainie/robocode
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (BattleEndedEvent) objec;

                serializer.serialize(buffer, obj.aborted);
                serializer.serialize(buffer, RbSerializerN.BattleResults_TYPE, obj.results);
            }
コード例 #35
0
ファイル: RobotStatus.cs プロジェクト: markthor/robocode
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (RobotStatus) objec;

                serializer.serialize(buffer, obj.energy);
                serializer.serialize(buffer, obj.x);
                serializer.serialize(buffer, obj.y);
                serializer.serialize(buffer, obj.bodyHeading);
                serializer.serialize(buffer, obj.gunHeading);
                serializer.serialize(buffer, obj.radarHeading);
                serializer.serialize(buffer, obj.velocity);
                serializer.serialize(buffer, obj.bodyTurnRemaining);
                serializer.serialize(buffer, obj.radarTurnRemaining);
                serializer.serialize(buffer, obj.gunTurnRemaining);
                serializer.serialize(buffer, obj.distanceRemaining);
                serializer.serialize(buffer, obj.gunHeat);
                serializer.serialize(buffer, obj.others);
                serializer.serialize(buffer, obj.numSentries);
                serializer.serialize(buffer, obj.roundNum);
                serializer.serialize(buffer, obj.numRounds);
                serializer.serialize(buffer, obj.time);
            }
コード例 #36
0
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (BulletMissedEvent)objec;

                serializer.serialize(buffer, obj.bullet.getBulletId());
            }
コード例 #37
0
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (HitRobotEvent) objec;

                serializer.serialize(buffer, obj.name);
                serializer.serialize(buffer, obj.bearing);
                serializer.serialize(buffer, obj.energy);
                serializer.serialize(buffer, obj.atFault);
            }
コード例 #38
0
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (BattleResults)objec;

                serializer.serialize(buffer, obj.teamLeaderName);
                serializer.serialize(buffer, obj.rank);
                serializer.serialize(buffer, obj.score);
                serializer.serialize(buffer, obj.survival);
                serializer.serialize(buffer, obj.lastSurvivorBonus);
                serializer.serialize(buffer, obj.bulletDamage);
                serializer.serialize(buffer, obj.bulletDamageBonus);
                serializer.serialize(buffer, obj.ramDamage);
                serializer.serialize(buffer, obj.ramDamageBonus);
                serializer.serialize(buffer, obj.firsts);
                serializer.serialize(buffer, obj.seconds);
                serializer.serialize(buffer, obj.thirds);
            }
コード例 #39
0
 private void put(String value)
 {
     serializer.serialize(calls, value);
 }
コード例 #40
0
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (BulletMissedEvent) objec;

                serializer.serialize(buffer, obj.bullet.getBulletId());
            }
コード例 #41
0
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (MouseWheelMovedEvent) objec;

                serializer.serialize(buffer, obj.ClickCount);
                serializer.serialize(buffer, obj.X);
                serializer.serialize(buffer, obj.Y);
                serializer.serialize(buffer, obj.ScrollType);
                serializer.serialize(buffer, obj.ScrollAmount);
                serializer.serialize(buffer, obj.WheelRotation);
                serializer.serialize(buffer, obj.ID);
                serializer.serialize(buffer, obj.ModifiersEx);
                serializer.serialize(buffer, obj.When);
            }
コード例 #42
0
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, Object obje)
            {
                var obj = (ExecCommands) obje;

                serializer.serialize(buffer, obj.bodyTurnRemaining);
                serializer.serialize(buffer, obj.radarTurnRemaining);
                serializer.serialize(buffer, obj.gunTurnRemaining);
                serializer.serialize(buffer, obj.distanceRemaining);

                serializer.serialize(buffer, obj.isAdjustGunForBodyTurn);
                serializer.serialize(buffer, obj.isAdjustRadarForGunTurn);
                serializer.serialize(buffer, obj.isAdjustRadarForBodyTurn);
                serializer.serialize(buffer, obj.isAdjustRadarForBodyTurnSet);

                serializer.serialize(buffer, obj.bodyColor);
                serializer.serialize(buffer, obj.gunColor);
                serializer.serialize(buffer, obj.radarColor);
                serializer.serialize(buffer, obj.scanColor);
                serializer.serialize(buffer, obj.bulletColor);

                serializer.serialize(buffer, obj.maxTurnRate);
                serializer.serialize(buffer, obj.maxVelocity);

                serializer.serialize(buffer, obj.moved);
                serializer.serialize(buffer, obj.scan);
                serializer.serialize(buffer, obj.isIORobot);
                serializer.serialize(buffer, obj.isTryingToPaint);

                serializer.serialize(buffer, obj.outputText);

                serializer.serialize(buffer, obj.graphicsCalls);

                foreach (BulletCommand bullet in obj.bullets)
                {
                    serializer.serialize(buffer, RbSerializerN.BulletCommand_TYPE, bullet);
                }
                buffer.put(RbSerializerN.TERMINATOR_TYPE);
                foreach (TeamMessage message in obj.teamMessages)
                {
                    serializer.serialize(buffer, RbSerializerN.TeamMessage_TYPE, message);
                }
                buffer.put(RbSerializerN.TERMINATOR_TYPE);
                foreach (DebugProperty prop in obj.debugProperties)
                {
                    serializer.serialize(buffer, RbSerializerN.DebugProperty_TYPE, prop);
                }
                buffer.put(RbSerializerN.TERMINATOR_TYPE);
            }
コード例 #43
0
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (ScannedRobotEvent) objec;

                serializer.serialize(buffer, obj.name);
                serializer.serialize(buffer, obj.energy);
                serializer.serialize(buffer, obj.heading);
                serializer.serialize(buffer, obj.bearing);
                serializer.serialize(buffer, obj.distance);
                serializer.serialize(buffer, obj.velocity);
                serializer.serialize(buffer, obj.isSentryRobot);
            }
コード例 #44
0
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (HitWallEvent) objec;

                serializer.serialize(buffer, obj.bearing);
            }
コード例 #45
0
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (SkippedTurnEvent)objec;

                serializer.serialize(buffer, obj.skippedTurn);
            }
コード例 #46
0
ファイル: BulletHitEvent.cs プロジェクト: markthor/robocode
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (BulletHitEvent) objec;

                serializer.serialize(buffer, obj.bullet.getBulletId());
                serializer.serialize(buffer, obj.name);
                serializer.serialize(buffer, obj.energy);
            }
コード例 #47
0
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, Object obje)
            {
                var obj = (ExecResults) obje;

                serializer.serialize(buffer, obj.halt);
                serializer.serialize(buffer, obj.shouldWait);
                serializer.serialize(buffer, obj.paintEnabled);

                serializer.serialize(buffer, RbSerializerN.ExecCommands_TYPE, obj.commands);
                serializer.serialize(buffer, RbSerializerN.RobotStatus_TYPE, obj.status);

                foreach (Event evnt in obj.events)
                {
                    serializer.serialize(buffer, evnt);
                }
                buffer.put(RbSerializerN.TERMINATOR_TYPE);
                foreach (TeamMessage message in obj.teamMessages)
                {
                    serializer.serialize(buffer, RbSerializerN.TeamMessage_TYPE, message);
                }
                buffer.put(RbSerializerN.TERMINATOR_TYPE);
                foreach (BulletStatus bulletStatus in obj.bulletUpdates)
                {
                    serializer.serialize(buffer, RbSerializerN.BulletStatus_TYPE, bulletStatus);
                }
                buffer.put(RbSerializerN.TERMINATOR_TYPE);
            }
コード例 #48
0
            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (RobotStatus)objec;

                serializer.serialize(buffer, obj.energy);
                serializer.serialize(buffer, obj.x);
                serializer.serialize(buffer, obj.y);
                serializer.serialize(buffer, obj.bodyHeading);
                serializer.serialize(buffer, obj.gunHeading);
                serializer.serialize(buffer, obj.radarHeading);
                serializer.serialize(buffer, obj.velocity);
                serializer.serialize(buffer, obj.bodyTurnRemaining);
                serializer.serialize(buffer, obj.radarTurnRemaining);
                serializer.serialize(buffer, obj.gunTurnRemaining);
                serializer.serialize(buffer, obj.distanceRemaining);
                serializer.serialize(buffer, obj.gunHeat);
                serializer.serialize(buffer, obj.others);
                serializer.serialize(buffer, obj.roundNum);
                serializer.serialize(buffer, obj.numRounds);
                serializer.serialize(buffer, obj.time);
            }