Beispiel #1
0
 public GamePicker(Player p)
 {
     InitializeComponent();
     player = p;
     WelcomeLabel.Content = "Welcome " + p.GetName() + "! Which game would you like to play?";
     ChipsLabel.Content = "You have " + p.GetChips() + " chips.";
 }
 public BlackjackScreen(Player p)
 {
     InitializeComponent();
     player = p;
     PlayButtonsEnabled(false);
     BetButtonsEnabled(true);
     SetChipDisplay();
 }
 public VideoPokerScreen(Player p)
 {
     InitializeComponent();
     player = p;
     PlayButtonsEnabled(false);
     BetButtonsEnabled(true);
     UpdateChips();
     
 }
 public RouletteScreen(Player p)
 {
     InitializeComponent();
     player = p;
     TableImage.Source = new BitmapImage(new Uri("pack://application:,,,/img/roulettetable.png"));
     WheelImage.Source = new BitmapImage(new Uri("pack://application:,,,/img/roulettewheel.png"));
     betArray = new int[49];
     chipPosArray = new Point[49];
     SetChipPosArray();
     DisplayChips();
 }
Beispiel #5
0
        public void SetContent(Player p, int contentId)
        {
            switch (contentId) 
            {
                case 0: ContentHolder.Content = new GamePicker(p); break;
                case 1: ContentHolder.Content = new BlackjackScreen(p); break;
                case 2: ContentHolder.Content = new SlotsScreen(p); break;
                case 3: ContentHolder.Content = new VideoPokerScreen(p); break;
                case 4: ContentHolder.Content = new RouletteScreen(p); break;
            }

        }
 public SlotsScreen(Player p)
 {
     InitializeComponent();
     player = p;
     reelImages = new BitmapImage[] {new BitmapImage(new Uri("pack://application:,,,/img/wild.png")),
                                     new BitmapImage(new Uri("pack://application:,,,/img/hadouken.png")),
                                     new BitmapImage(new Uri("pack://application:,,,/img/laura.png")),
                                     new BitmapImage(new Uri("pack://application:,,,/img/chun.png")),
                                     new BitmapImage(new Uri("pack://application:,,,/img/mika.png")),
                                     new BitmapImage(new Uri("pack://application:,,,/img/karin.png")),
                                     new BitmapImage(new Uri("pack://application:,,,/img/ace.png")),
                                     new BitmapImage(new Uri("pack://application:,,,/img/king.png")),
                                     new BitmapImage(new Uri("pack://application:,,,/img/queen.png")),
                                     new BitmapImage(new Uri("pack://application:,,,/img/jack.png")),
                                     new BitmapImage(new Uri("pack://application:,,,/img/ten.png"))};
     waitImage = new BitmapImage(new Uri("pack://application:,,,/img/Wait.bmp"));
     rng = new Random();
     SetInitialImages();
     SetButtonsActive(true);
 }