Example #1
0
 private void btnStart_Click(object sender, EventArgs e)
 {
     try
     {
         FrmData pie     = new FrmData();
         FrmGame frmGame = new FrmGame((int)nupNbDeck.Value, (int)nupNbPlayer.Value, (int)nupNbTurn.Value, (int)nupNbTable.Value, (int)nupCash.Value, pie);
         frmGame.Show();
     }
     catch
     {
         MessageBox.Show("Le nombre de paquets n'est pas suffisant pour le nombre de joueurs", "Erreur", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Example #2
0
        public FrmGame(int nbDeck, int nbPlayer, int nbTurn, int nbTable, int cash, FrmData frm)
        {
            InitializeComponent();
            nbTurnMax = nbTurn;
            for (int i = 0; i < nbTable; i++)
            {
                lstTable.Add(new Table(nbDeck, nbPlayer, cash));
            }
            playerPro = new PlayerPro(cash);
            play();
            frmData       = frm;
            StartPosition = FormStartPosition.Manual;

            Location = new Point(0, 0);
            frmData.Show();
            initDisplayTable(nbTable, nbPlayer);
            tmrTurn.Enabled       = true;
            frmData.StartPosition = FormStartPosition.Manual;
            frmData.Location      = new Point(0, Size.Height);
        }