public XmlNode Initialize(PlayerProxy player, XmlNode node) { (string color, List <string> list_of_color) = parser.InitializeXML(node); //if(player.Color != color){ // throw new ArgumentException("Color is inconsistent"); //} player.iplayer.Initialize(color, list_of_color); return(maker.ToXmlNode(maker.VoidXML())); }
public void ProxyPlay(string name, string color, StreamWriter writer, StreamReader reader) { // launch the proxy player // 1. constructor: machine player, color, port number PlayerProxy playerProxy = new PlayerProxy(new MostSymmetricPlayer(name), color, writer, reader); Console.WriteLine("Made the proxyplayer"); // run while (!playerProxy.GameFinished) { playerProxy.Play(); } }