Examples of addInt32()


Examples of utility.GamePacket.addInt32()

    }

    @Override
    public byte[] constructResponseInBytes() {
        GamePacket packet = new GamePacket(responseCode);
        packet.addInt32(env_id);
        packet.addInt32(score);
        return packet.getBytes();
    }

    public void setEnvID(int env_id) {
View Full Code Here

Examples of utility.GamePacket.addInt32()

    @Override
    public byte[] constructResponseInBytes() {
        GamePacket packet = new GamePacket(responseCode);
        packet.addInt32(env_id);
        packet.addInt32(score);
        return packet.getBytes();
    }

    public void setEnvID(int env_id) {
        this.env_id = env_id;
View Full Code Here

Examples of utility.GamePacket.addInt32()

                    if (predatorList.endsWith(", ")) {
                        predatorList = predatorList.substring(0, predatorList.lastIndexOf(","));
                    }

                    packet.addString(predatorList);
                    packet.addInt32(plant.getModelID());
                    packet.addInt32((int) plant.getAvgBiomass());
                } else if (species.getGroupType() == Constants.ORGANISM_TYPE_ANIMAL) {
                    AnimalType animal = (AnimalType) species;

                    packet.addShort16((short) animal.getID());
View Full Code Here

Examples of utility.GamePacket.addInt32()

                        predatorList = predatorList.substring(0, predatorList.lastIndexOf(","));
                    }

                    packet.addString(predatorList);
                    packet.addInt32(plant.getModelID());
                    packet.addInt32((int) plant.getAvgBiomass());
                } else if (species.getGroupType() == Constants.ORGANISM_TYPE_ANIMAL) {
                    AnimalType animal = (AnimalType) species;

                    packet.addShort16((short) animal.getID());
                    packet.addString(animal.getSpeciesName());
View Full Code Here

Examples of utility.GamePacket.addInt32()

                    packet.addShort16((short) animal.getAvgBiomass());
                    packet.addShort16((short) animal.getMass());
                    packet.addShort16((short) animal.getMovtForce());
                    packet.addShort16((short) animal.getMaxForce());
                    packet.addInt32(animal.getModelID());
                    packet.addString(animal.getAnimalCategory());
                }
            }
        }
View Full Code Here

Examples of utility.GamePacket.addInt32()

    }

    @Override
    public byte[] constructResponseInBytes() {;
        GamePacket packet = new GamePacket(responseCode);
        packet.addInt32(env.getID());
        packet.addShort16((short) env.getRow());
        packet.addShort16((short) env.getColumn());
        packet.addInt32(env.getOwnerID());
        packet.addInt32(env.getEnvironmentScore());
View Full Code Here

Examples of utility.GamePacket.addInt32()

    public byte[] constructResponseInBytes() {;
        GamePacket packet = new GamePacket(responseCode);
        packet.addInt32(env.getID());
        packet.addShort16((short) env.getRow());
        packet.addShort16((short) env.getColumn());
        packet.addInt32(env.getOwnerID());
        packet.addInt32(env.getEnvironmentScore());

        for (Zone zone : env.getZones()) {
            packet.addShort16((short) zone.getID());
            packet.addShort16((short) zone.getType());
View Full Code Here

Examples of utility.GamePacket.addInt32()

        GamePacket packet = new GamePacket(responseCode);
        packet.addInt32(env.getID());
        packet.addShort16((short) env.getRow());
        packet.addShort16((short) env.getColumn());
        packet.addInt32(env.getOwnerID());
        packet.addInt32(env.getEnvironmentScore());

        for (Zone zone : env.getZones()) {
            packet.addShort16((short) zone.getID());
            packet.addShort16((short) zone.getType());
View Full Code Here

Examples of utility.GamePacket.addInt32()

            WaterSource waterSource = zone.getWaterSource();
            packet.addBoolean(waterSource != null);

            if (waterSource != null) {
                packet.addInt32(waterSource.getID());
                packet.addInt32(waterSource.getMaxWater());
                packet.addInt32(waterSource.getWater());
            }
        }
View Full Code Here

Examples of utility.GamePacket.addInt32()

            WaterSource waterSource = zone.getWaterSource();
            packet.addBoolean(waterSource != null);

            if (waterSource != null) {
                packet.addInt32(waterSource.getID());
                packet.addInt32(waterSource.getMaxWater());
                packet.addInt32(waterSource.getWater());
            }
        }

        return packet.getBytes();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.