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);
        }
    }
    public RouletteRoll()
    {
        Random rnd = new Random();

        _roll = rnd.Next(0, 36);

        _past              = new PastRolls(_roll);
        PastRolls.rolling  = true;
        PastRolls.isRolled = true;
        PastRolls.DisplayList();
    }
Exemple #3
0
 public RouletteBoard(Window window, Load user, PastRolls rolls)
 {
     _window = window;
     _user   = user;
     window.Clear(SplashKit.RGBColor(0, 129, 62));
     SplashKit.DrawBitmap(_mainBoard, XOffset(), YOffset());
     if (PastRolls.rolling)
     {
         UpdateBalance(user);
     }
     window.Refresh();
 }
Exemple #4
0
    public Load(int id, string name)
    {
        _userId = id;
        _name   = name;
        SplashKit.OpenDatabase("user", "user_database");
        InitialiseUser();

        PastRolls pr = new PastRolls(0);

        for (int x = 0; x < 10; x++)
        {
            Random rnd = new Random();
            pr.AddToList(rnd.Next(0, 36));
        }
        _balance = 1000.0;
    }