Пример #1
0
 protected override void InitalizeResource()
 {
     //Get_Last_Data();
     SweeperSource.Reset();
     SweeperSource.Restart();
     base.InitalizeResource();
 }
Пример #2
0
 protected override void OnMouseUp(object sender, MouseClickEventArgs e)
 {
     Input.LeftButton            = Input.RightButton = false;
     SweeperSource.Is_Mouse_Down = false;
     if (e.button == MouseButton.LeftButton)
     {
         Input.LeftButton = true;
         SweeperSource.Judge_Pos(true);
         Game.Do_it();
     }
     else
     if (e.button == MouseButton.RightButton)
     {
         Input.RightButton = true;
         SweeperSource.Judge_Pos(true);
         Game.Flag();
     }
     base.OnMouseUp(sender, e);
 }
Пример #3
0
        public static void Do_it()
        {
            int x = SweeperSource.Pos_Wid, y = SweeperSource.Pos_Hei;

            if (y == -1)
            {
                SweeperSource.Clean_Old();
                return;
            }
            if (y == -2)
            {
                return;
            }
            if (State_of_Game == 0)
            {
                SweeperSource.Restart();
                State_of_Game = 1;
                Game_Cnt++;
            }
            SweeperSource.Should_Time_Stop = false;
            if (View[y, x] == 2)
            {
                return;
            }
            if (State[y, x] == -1)
            {
                Lose();
            }
            else
            {
                EnAble(y, x);
            }
            Console.WriteLine(new Vector2(y, x));
            Console.WriteLine(View[y, x]);
            Console.WriteLine(State[y, x]);
            Console.WriteLine(State_of_Game);
            Console.WriteLine();
        }
Пример #4
0
 protected override void OnMouseDown(object sender, MouseClickEventArgs e)
 {
     SweeperSource.Is_Mouse_Down = true;
     SweeperSource.Judge_Pos(true);
     base.OnMouseDown(sender, e);
 }
Пример #5
0
 protected override void OnKeyDown(object sender, BoardClickEventArgs e)
 {
     SweeperSource.Press_Down(e);
     base.OnKeyDown(sender, e);
 }