PlayerBust,
PocketJack,
DealerActive,
DealerWon,
DealerBust,
Push
}
GameMode modeValue;
GameMode mode
{
get
{
return modeValue;
}
set
{
switch (value)
{
case GameMode.LoadingDisplay:
BetMinusToolStripMenuItem1.Enabled = false;
BetPlusToolStripMenuItem.Enabled = false;
HitMeToolStripMenuItem.Enabled = false;
StayToolStripMenuItem.Text = "Point";
StayToolStripMenuItem.Enabled = false;
MenuToolStripMenuItem.Text = "21";
MenuToolStripMenuItem.Enabled = false;
break;
case GameMode.PlacingBets:
BetMinusToolStripMenuItem1.Enabled = true;
BetPlusToolStripMenuItem.Enabled = true;
HitMeToolStripMenuItem.Enabled = false;
StayToolStripMenuItem.Text = "Себе";
StayToolStripMenuItem.Enabled = true;
MenuToolStripMenuItem.Text = "Menu";
MenuToolStripMenuItem.Enabled = true;
break;
case GameMode.PlayerActive:
BetMinusToolStripMenuItem1.Enabled = false;
BetPlusToolStripMenuItem.Enabled = false;
HitMeToolStripMenuItem.Enabled = true;
StayToolStripMenuItem.Text = "Take a card to yourself";
StayToolStripMenuItem.Enabled = true;
MenuToolStripMenuItem.Text = "Menu";
MenuToolStripMenuItem.Enabled = true;
//Disturbing noise of the support groups
//surrounding the player:
//not single, but continuous Looping;
Assembly a = Assembly.GetExecutingAssembly();
Stream s =
a.GetManifestResourceStream(
"PocketJack.pj_bg_noise.wav");
SoundPlayer player = new SoundPlayer(s);
player.PlayLooping();
break;
case GameMode.PlayerWon:
BetMinusToolStripMenuItem1.Enabled = false;
BetPlusToolStripMenuItem.Enabled = false;
HitMeToolStripMenuItem.Enabled = false;
StayToolStripMenuItem.Text = "Distribution of cards";
StayToolStripMenuItem.Enabled = true;
MenuToolStripMenuItem.Text = "Menu";
MenuToolStripMenuItem.Enabled = true;
//An applause in our address for a prize in cards:
Assembly a1 = Assembly.GetExecutingAssembly();
Stream s1 =
a1.GetManifestResourceStream(
"PocketJack.pj_claps.wav");
SoundPlayer player1 = new SoundPlayer(s1);
player1.Play();
break;
case GameMode.PlayerBust:
BetMinusToolStripMenuItem1.Enabled = false;
BetPlusToolStripMenuItem.Enabled = false;
HitMeToolStripMenuItem.Enabled = false;
StayToolStripMenuItem.Text = "Distribution of cards";
StayToolStripMenuItem.Enabled = true;
MenuToolStripMenuItem.Text = "Menu";
MenuToolStripMenuItem.Enabled = true;
//Discontent of support group with our exceeding of
//cards:
Assembly a2 = Assembly.GetExecutingAssembly();
Stream s2 =
a2.GetManifestResourceStream(
"PocketJack.pj_busted.wav");
SoundPlayer player2 = new SoundPlayer(s2);
player2.Play();
break;
case GameMode.PocketJack:
BetMinusToolStripMenuItem1.Enabled = false;
BetPlusToolStripMenuItem.Enabled = false;
HitMeToolStripMenuItem.Enabled = false;
StayToolStripMenuItem.Text = "Distribution of cards";
StayToolStripMenuItem.Enabled = true;
MenuToolStripMenuItem.Text = "Menu";
MenuToolStripMenuItem.Enabled = true;
//A victorious tune after Pocket Jack with 21 points:
Assembly a3 = Assembly.GetExecutingAssembly();
Stream s3 =
a3.GetManifestResourceStream(
"PocketJack.pj_pj.wav");
SoundPlayer player3 = new SoundPlayer(s3);
player3.Play();
break;
СКАЧАТЬ