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); }
/// <summary> /// Tester si le joueur pro est sur une table /// </summary> private void testIdGame() { if (idGame < 0) { idGame = getGameIndMaxSabotValue(); if (idGame >= 0) { lstTable[idGame].addPlayerPro(playerPro); } } else if (lstTable[idGame].RealSabotValue < PlayerPro.SABOT_TO_STAY) { PlayerPro pTest = lstTable[idGame].removeAndGetPlayerPro(); idGame = getGameIndMaxSabotValue(); if (idGame >= 0) { lstTable[idGame].addPlayerPro(playerPro); } } }
public void setPlayerPro(PlayerPro playerPro) { PlayerPro = new PlayerData(playerPro); }