コード例 #1
0
    public void RouletteWindow()
    {
        Window    window = new Window("Roulette", 771, 549);
        PastRolls pr     = new PastRolls(window);

        PastRolls._window = window;
        RouletteBoard board = new RouletteBoard(window, _user, pr);

        PastRolls.DisplayList();

        while (!window.CloseRequested)
        {
            SplashKit.ProcessEvents();
            Input.Run();
            if (!PastRolls.rolling)
            {
                board.UpdateBalance(_user);
            }
            if (PastRolls.isRolled)
            {
                PastRolls.DisplayList();
            }
            SplashKit.RefreshWindow(window, 60);
        }
    }
コード例 #2
0
    public RouletteRoll()
    {
        Random rnd = new Random();

        _roll = rnd.Next(0, 36);

        _past              = new PastRolls(_roll);
        PastRolls.rolling  = true;
        PastRolls.isRolled = true;
        PastRolls.DisplayList();
    }