PG2 – LAB 2: BLACKJACK OBJECTS CONTENTS Overview ........................................................................................................................................................

1 answer below »
Pleas help with my c# project


PG2 – LAB 2: BLACKJACK OBJECTS CONTENTS Overview ........................................................................................................................................................................ 2 Part A - Classes............................................................................................................................................................... 2 Part A-1: Setup .......................................................................................................................................................... 2 Grading: 5 points ................................................................................................................................................... 3 Part A-2: enums ......................................................................................................................................................... 3 Grading: 5 points ................................................................................................................................................... 3 Part A-3: ICard ........................................................................................................................................................... 3 Grading: 5 points ................................................................................................................................................... 3 Part A-4: The Card Class ............................................................................................................................................ 4 PROPERTIES ........................................................................................................................................................... 4 METHODS .............................................................................................................................................................. 4 Grading: 10 points ................................................................................................................................................. 4 Part A-5: The Card Factory class ........................................................................................
Answered 4 days AfterOct 08, 2021

Answer To: PG2 – LAB 2: BLACKJACK OBJECTS CONTENTS Overview...

Swapnil answered on Oct 10 2021
121 Votes
93225/BlackJack.sln
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlackJack", "BlackJack\BlackJack.csproj", "{CBBBE229-21C7-4F53-80E6-9690066230DE}"
EndProject
Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Deb
ug|Any CPU = Debug|Any CPU
        Release|Any CPU = Release|Any CPU
    EndGlobalSection
    GlobalSection(ProjectConfigurationPlatforms) = postSolution
        {CBBBE229-21C7-4F53-80E6-9690066230DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {CBBBE229-21C7-4F53-80E6-9690066230DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {CBBBE229-21C7-4F53-80E6-9690066230DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {CBBBE229-21C7-4F53-80E6-9690066230DE}.Release|Any CPU.Build.0 = Release|Any CPU
    EndGlobalSection
    GlobalSection(SolutionProperties) = preSolution
        HideSolutionNode = FALSE
    EndGlobalSection
EndGlobal
93225/BlackJack/AceCard.cs
namespace BlackJack
{
internal class AceCard : Card
{
public AceCard(string suit)
: base("Ace", suit, 11)
{
}
}
}
93225/BlackJack/App.config




93225/BlackJack/BlackJack.csproj



Debug
AnyCPU
{CBBBE229-21C7-4F53-80E6-9690066230DE}
Exe
Properties
BlackJack
BlackJack
v4.6
512
true


AnyCPU
true
full
false
bin\Debug\
DEBUG;TRACE
prompt
4


AnyCPU
pdbonly
true
bin\Release\
TRACE
prompt
4



























93225/BlackJack/BlackJackGame.cs
using System;
using System.Collections.Generic;
namespace BlackJack
{
public class BlackJackGame
{
public void Play()
{
_discardPile = new List();
_player = new Player();
_dealer = new Dealer();
_deck = new DeckOfCards();
_deck.Shuffle();
while (true)
{
List discards;
discards = _player.ClearYourHand();
_discardPile.AddRange(discards);
discards = _dealer.ClearYourHand();
_discardPile.AddRange(discards);
Card cardToDeal;
cardToDeal = GetTopCardFromDeck();
_player.PutInHand(cardToDeal);
cardToDeal = GetTopCardFromDeck();
_dealer.PutInHand(cardToDeal);
cardToDeal = GetTopCardFromDeck();
_player.PutInHand(cardToDeal);
cardToDeal = GetTopCardFromDeck();
_dealer.PutInHand(cardToDeal);
PrintTheGame();
while (_player.HasNotGoneOver21() && _player.WantsAnotherCard())
{
cardToDeal = GetTopCardFromDeck();
_player.PutInHand(cardToDeal);
PrintTheGame();
}
if (_player.HasGoneOver21())
{
Console.WriteLine("You have lost, human.");
Console.WriteLine("It is a sad day for your species.");
}
else
{
_dealer.ShowAllOfYourCards();
while (_dealer.HasNotGoneOver21() && _dealer.WantsAnotherCard())
{
cardToDeal = GetTopCardFromDeck();
_dealer.PutInHand(cardToDeal);
}
PrintTheGame();
if (_dealer.HasGoneOver21())
{
Console.WriteLine("You win, this time, human.");
}
else if...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here