Example #1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Connect4 game = new Connect4())
     {
         game.Run();
     }
 }
Example #2
0
 public GameplayState(Connect4 game, string userName, string hostName, int port)
 {
     owner = game;
     checkers = new List<Sprite>();
     c4Game = new Connect4ClientGame(userName);
     c4Game.Notify += ((msg) => Console.WriteLine(msg));
     this.hostName = hostName;
     this.userName = userName;
     this.port = port;
 }
Example #3
0
 public PreConnectionState(Connect4 game)
 {
     owner = game;
     if (userName == null)
     {
         userName = new StringBuilder();
         hostName = new StringBuilder("localhost");
         port = new StringBuilder("4000");
     }
 }
Example #4
0
 public void ChangeState(Connect4 game, IGameState state)
 {
     game.ChangeState(state);
 }