public void sync(Player o) { id = o.id; name = o.name; state = o.state; message = o.message; ai = o.ai; for (int i = 0; i < items.Length; i++) { items[i] = o.items[i]; } // fdead = o.fdead; deadReason = o.deadReason; deadid = o.deadid; discoverer = o.discoverer; murderer = o.murderer; murdererTurn = o.murdererTurn; dayDiscovere = o.dayDiscovere; dayDead = o.dayDead; dayKill = o.dayKill; dayMurdererSuccess = o.dayMurdererSuccess; dayUseItem = o.dayUseItem; dayNoonCount = o.dayNoonCount; dayNightVote = o.dayNightVote; dayMidKnifeP = o.dayMidKnifeP; // net_opp = o.net_opp; net_item = o.net_item; }
public void addPlayer(string name, ai.AI_MODE aimode) { if (isPlayer(name)) { Logger.info("player is already. name=" + name); return; } var p = new Player(); p.ai = aimode; p.id = players.Count + 1; p.name = name; players.Add(p); }