コード例 #1
0
    public string Encode()
    {
        StringEncoderBuilder sb = new StringEncoderBuilder(".");

        sb.Append(siteId);
        sb.Append(pos.x);
        sb.Append(pos.y);
        sb.Append(radius);
        return(sb.Build());
    }
コード例 #2
0
    public string Encode()
    {
        StringEncoderBuilder sb = new StringEncoderBuilder("|");

        sb.Append(sites.Count);
        for (int i = 0; i < sites.Count; i++)
        {
            sb.Append(sites[i].Encode());
        }
        return(sb.Build());
    }
コード例 #3
0
    public string Encode()
    {
        StringEncoderBuilder result = new StringEncoderBuilder(".");

        if (pos == null)
        {
            pos = new Position();
        }
        result.Append(pos.x);
        result.Append(pos.y);
        result.Append((int)owner);
        result.Append((int)unitType);
        result.Append(health);
        return(result.Build());
    }
コード例 #4
0
    public string Encode()
    {
        StringEncoderBuilder result = new StringEncoderBuilder(".");

        result.Append(siteId);
        result.Append(gold);
        result.Append(maxMineSize);
        result.Append((int)structureType);
        result.Append((int)owner);
        result.Append((param1));
        result.Append((int)creepsType);
        result.Append(isMinedOut);
        return(result.Build());
    }
コード例 #5
0
    public string Encode()
    {
        StringEncoderBuilder result = new StringEncoderBuilder("|");
        int noOfSites = sites.Count;

        result.Append(noOfSites);
        for (int i = 0; i < sites.Count; i++)
        {
            result.Append(sites[i].Encode());
        }
        int noOfUnits = units.Count;

        result.Append(noOfUnits);
        for (int i = 0; i < units.Count; i++)
        {
            result.Append(units[i].Encode());
        }

        result.Append(money);
        result.Append(touchedSiteId);
        return(result.Build());
    }