Exemplo n.º 1
0
 public ChatClient(GameHallWindow gameHallWindow)
 {
     this.gameHallWindow = gameHallWindow;
     netThread           = new Thread(new ThreadStart(WaitForPackets));
     udpClient           = new UdpClient(4445);
     remotePoint         = new IPEndPoint(gameHallWindow.MenuWindowInfo.ServerIPAddress, 4444);
     netThread.Start();
 }
Exemplo n.º 2
0
 public GameHall(GameHallWindow gameHallWindow)
 {
     players             = new ObservableCollection <Player>();
     playersDictionary   = new Dictionary <string, Player>();
     this.gameHallWindow = gameHallWindow;
     gameMain            = gameHallWindow.GameMainWindowInfo.GameMainInfo;
     gameHallClient      = new GameHallClient(this, gameMain);
     gameHallWindow.clientDataGrid.DataContext = players;
 }
        public GameMainWindow(GameHallWindow gameHallWindow)
        {
            InitializeComponent();
            chessPiece = new ChessPiece(this);
            chessBoard = new ChessBoard(this, chessPiece);
            chessPiece.InitializeRedPieces();
            chessPiece.InitializeBlackPieces();
            chessBoard.InitializeButtonToGrid();
            chessBoard.InitializeGrids();
            Button button = chessPiece.BlackPieceButtons["blackGuardButtonLeft"];

            this.gameHallWindow = gameHallWindow;
            gameMain            = new GameMain(this, gameHallWindow);
            selectButton        = null;
            closeForWin         = false;
        }
Exemplo n.º 4
0
 public GameMain(GameMainWindow gameMainWindow, GameHallWindow gameHallWindow)
 {
     this.gameMainWindow = gameMainWindow;
     this.gameHallWindow = gameHallWindow;
 }