private void InitRound(Croupier croupier, Player gamer) { PrintInfo.PrintScore(gamer.Win, gamer.Loss); GiveCard(gamer, 2); GiveCard(croupier, 1); ShowPlayersCards(croupier, gamer); }
private void ShowPlayersCards(Croupier croupier, Player gamer) { PrintInfo.PrintOtherMes(TypeMessage.CardCroupier); PrintInfo.PrintCards(croupier.PlayerCards); PrintInfo.PrintSpot(PlayerSpot(croupier)); PrintInfo.PrintOtherMes(TypeMessage.CardPlayer); PrintInfo.PrintCards(gamer.PlayerCards); PrintInfo.PrintSpot(PlayerSpot(gamer)); }
private void StepCoupier() { // Croupier must say enough while spot more then 17 point while (_croupier.State == StatusPlayer.Play) { if (PlayerSpot(_croupier) > 17) { _croupier.State = StatusPlayer.Enough; break; } PrintInfo.PrintOtherMes(TypeMessage.StepCroupier); GiveCard(_croupier, 1); ShowPlayersCards(_croupier, _gamer); } }
private ConsoleKeyInfo ChooseGamerDraw() { ConsoleKeyInfo cki; while (true) { PrintInfo.PrintOtherMes(TypeMessage.FinishRound); cki = WorkKey.GetPressKey(); if (WorkKey.CompareKey(cki, ConsoleKey.Y) || WorkKey.CompareKey(cki, ConsoleKey.N)) { break; } } return(cki); }
private void FinishRound(ResultGame res) { _gamer.State = StatusPlayer.Play; _croupier.State = StatusPlayer.Play; _gamer.GiveBackCards(); _croupier.GiveBackCards(); if (res == ResultGame.Draw) { PrintInfo.PrintResult(ResultGame.Draw); } if (res == ResultGame.Loss) { _gamer.Loss += 1; PrintInfo.PrintResult(ResultGame.Loss); } if (res == ResultGame.Win) { _gamer.Win += 1; PrintInfo.PrintResult(ResultGame.Win); } }
private void StepGamer() { ConsoleKeyInfo cki; while (_gamer.State == StatusPlayer.Play) { PrintInfo.PrintOtherMes(TypeMessage.MenuPlayer); cki = WorkKey.GetPressKey(); //Gamer take one card if (WorkKey.CompareKey(cki, ConsoleKey.F5)) { StepGamerTakeOneCard(_gamer); } //Gamer refuse one card if (WorkKey.CompareKey(cki, ConsoleKey.F6)) { } // Gamer say Enough if (WorkKey.CompareKey(cki, ConsoleKey.F7)) { _gamer.State = StatusPlayer.Enough; } } }
private void CroupierTakeSecondCard() { PrintInfo.PrintOtherMes(TypeMessage.StepCroupier); GiveCard(_croupier, 1); ShowPlayersCards(_croupier, _gamer); }