Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MultiPlayerModel"/> class.
 /// </summary>
 /// <param name="server">The server.</param>
 public MultiPlayerModel(IServer server)
 {
     this.server = server;
     this.server.OnResponseReceived += this.ServerResponseHandler;
     this.cols           = int.Parse(AppSettings.Settings["cols"]);
     this.rows           = int.Parse(AppSettings.Settings["rows"]);
     this.answersFactory = new JsonAnswerFactory();
     this.connected      = true;
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SinglePlayerModel"/> class.
 /// </summary>
 /// <param name="server">The server.</param>
 public SinglePlayerModel(IServer server)
 {
     this.server = server;
     this.server.OnResponseReceived += this.ServerResponseHandler;
     // read the cols and rows from app.config
     this.cols           = int.Parse(AppSettings.Settings["cols"]);
     this.rows           = int.Parse(AppSettings.Settings["rows"]);
     this.answersFactory = new JsonAnswerFactory();
     this.connected      = true;
 }