public playerController(pokerController controllerPoker, int numberOfCards) { _controllerPoker = controllerPoker; _model = new playerModel(numberOfCards); makeCardViews(_model.NumberOfCards); _view = new playerView(this); }
public void nextPlayer() { //Volgende speler oproepen //veranderen van huidige speler achtergrond kleur -> veranderen = false changeStyleCurrent(false); //Nieuwe index van speler toekenen int newIndexCurrent = nextIndexNumberOf(_model.IndexCurrentPlayer); string textButton = _model.View_button.getTextButton(); //nieuwe speler klaarmaken if (_model.IndexCurrentPlayer == _model.IndexStopPlayer && !_model.FirstGame && !_model.NewHighest) { endRound(); } else { makeCurrent(newIndexCurrent); //tekst huidige speler laten veranderen _model.View_button.updateCurrentPlayer(); //checken welke nummers mag in raise playerModel currentPlayerModel = _model.getCurrentPlayer().getModelPlayer(); int curInzet = currentPlayerModel.MomenteleInzet; int newMin = 0; int newMax = currentPlayerModel.Kapitaal; //bepalen minimum if (_model.BiggestBet > curInzet) { newMin = _model.BiggestBet - curInzet + 1; } _model.View_button.changeBoundriesRaise(newMin, newMax); } /*if (_model.IndexCurrentPlayer == _model.IndexStopPlayer && !_model.FirstGame && !firstRound) * { * firstRound = true; * }*/ if (!gameEnded) { //checken voor allereerste volgende speler if (_model.FirstGame) { _model.FirstRoundOfHand = true; _model.FirstGame = false; } //checken of eerste ronde is en persoon nog mag checken if (newIndexCurrent == _model.IndexStopPlayer && _model.FirstRoundOfHand) { //tonen van check knop if (_model.View_button.getTextButton() != "Check\r\n") { //_model.View_button.toggleCheck(); } } if (_model.NewHighest) { _model.NewHighest = false; } } }
public playerController(pokerController controllerPoker, int numberOfCards) { _controllerPoker = controllerPoker; _model = new playerModel(numberOfCards, this); makeCardViews(_model.NumberOfCards); _view = new playerView(this); }