コード例 #1
0
        public void StartNewGame()
        {
            mahjongLogic = new MahjongLogic();
            mahjongLogic.StartGamingThread();
            mahjongLogic.NewGame_Handle(25000, 4);
            mahjongLogic.NextScene();

            // Set callback
            mahjongLogic.PlayerActionResponseCallback += PlayerActionResponseCallback;
            mahjongLogic.PlayerActionAcceptedCallback += PlayerActionAcceptedCallback;

            // Initialize the players
            grdsHandcard     = new Grid[] { grdHandcardSelf, grdHandcardDownwind, grdHandcardOppositewind, grdHandcardUpwind };
            grdsRivercard    = new Grid[] { grdRiverSelf, grdRiverDownwind, grdRiverOppositewind, grdRiverUpwind };
            lblsPlayerPoint  = new Label[] { lblPointSelf, lblPointDownwind, lblPointOppsitewind, lblPointUpwind };
            lblsPlayerWind   = new Label[] { lblWindSelf, lblWindDownwind, lblWindOppositewind, lblWindUpwind };
            grdsPlayerAction = new Grid[] { grdActionSelf, grdActionDownwind, grdActionOppositewind, grdActionUpwind };
            grdsFuru         = new Grid[] { grdFuruEast, grdFuruSouth, grdFuruWest, grdFuruNorth };

            // Clear
            foreach (Grid panel in grdsPlayerAction)
            {
                panel.Children.Clear();
            }
        }