コード例 #1
0
        public MultiplayerWindow(string gameName)
        {
            InitializeComponent();
            myPosition    = new Position(0, 0);
            otherPosition = new Position(0, 0);
            this.name     = gameName;


            int    port = Properties.Settings.Default.ServerPort;
            string ip   = Properties.Settings.Default.ServerIP;

            vm = new MultiplayerVM(this.name, port, ip);
            vm.Join(gameName);
            DataContext = vm;
        }
コード例 #2
0
        public MultiplayerWindow(string name, int row, int col)
        {
            InitializeComponent();

            this.name     = name;
            this.row      = row;
            this.col      = col;
            myPosition    = new Position(0, 0);
            otherPosition = new Position(0, 0);

            int    port = Properties.Settings.Default.ServerPort;
            string ip   = Properties.Settings.Default.ServerIP;

            vm = new MultiplayerVM(this.name, this.row, this.col, port, ip);
            vm.startGame(this.name, this.row, this.col);
            DataContext = vm;
        }