Пример #1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (BattleShips game = new BattleShips())
     {
         game.Run();
     }
 }
Пример #2
0
 public TCPClient(BattleShips game, IPAddress serverAddress, int port)
 {
     _game = game;
     Console.WriteLine("Creating TCP client");
     this.serverEndpoint = new IPEndPoint(serverAddress, port);
     Thread connectionThread = new Thread(new ThreadStart(AttemptConnection));
     connectionThread.Start();
 }
Пример #3
0
 public Form1(BattleShips game)
 {
     _game = game;
     InitializeComponent();
     KeyPreview = true;
 }