Пример #1
0
        /// <summary>
        /// start to generte a multiplayer game
        /// </summary>
        public void StartGame()
        {
            Game g = ser.g;

            gamename        = g.Name;
            MyMaze          = g.You;
            YarivMaze       = g.Other;
            this.MazeString = MyMaze.GetMaze();
            this.Coordinate = MyMaze.GetStart();
            EndRow          = MyMaze.End.Row;
            EndCol          = MyMaze.End.Col;
            int r = MyMaze.Start.Row;
            int c = MyMaze.Start.Col;

            StartPoint          = new Pair(r, c);
            this.MyRow          = r;
            this.MyCol          = c;
            this.MazeName       = MyMaze.Name;
            this.Yriv_Cor       = YarivMaze.Start;
            this.YrivCol        = this.Yriv_Cor.Col;
            this.YrivRow        = this.Yriv_Cor.Row;
            this.EndYrivCol     = YarivMaze.End.Col;
            this.EndYrivRow     = YarivMaze.End.Row;
            this.YrivMazeString = YarivMaze.Maze;
            Wait = false;
        }
Пример #2
0
        public void MazeHelper()
        {
            MyMaze          = ser.maze;
            this.MazeString = MyMaze.GetMaze();
            this.Coordinate = MyMaze.GetStart();
            EndRow          = MyMaze.End.Row;
            EndCol          = MyMaze.End.Col;
            int r = MyMaze.Start.Row;
            int c = MyMaze.Start.Col;

            StartPoint    = new Pair(r, c);
            this.MyRow    = r;
            this.MyCol    = c;
            this.MazeName = MyMaze.Name;
        }