public void SetTeamSize(int size)
    {
        MinigameTeam newTeam = new MinigameTeam(size);

        foreach (PhotonPlayer player in this.Team)
        {
            newTeam.AddPlayer(player);
        }

        this.Team = newTeam;
    }
    private static object DeserializeMinigameTeam(byte[] bytes)
    {
        int index = 0;
        int teamID;
        int score;
        int maxSize;

        // Deserialize teamID, score, and maxSize
        Protocol.Deserialize(out teamID, bytes, ref index);
        Protocol.Deserialize(out score, bytes, ref index);
        Protocol.Deserialize(out maxSize, bytes, ref index);

        // Make a team with maxSize player slots
        MinigameTeam team = new MinigameTeam(teamID, maxSize);
        team.Score = score; // Sync the score

        // Sync the players
        for (int i = 0; i < maxSize; i++)
        {
            short slotFilled;
            int indexOfID = index + (maxSize * sizeof(short));
            Protocol.Deserialize(out slotFilled, bytes, ref index);

            int ID;
            if (slotFilled == 1)
            {
                Protocol.Deserialize(out ID, bytes, ref indexOfID);
                PhotonPlayer player = PhotonPlayer.Find(ID);
                team.AddPlayer(player);
            }
        }

        return team;
    }