Answer by Manolis for Command line Blackjack
In decideWinner(), why not name the variables playerHandTotal and dealerHandTotal, following the very descriptive convention of its arguments, instead of using the confusing hand1Total and hand2Total?
View ArticleAnswer by YawarRaza7349 for Command line Blackjack
while (true){ int dealerTotal = calcHandTotal(islDealerHand); while (dealerTotal < 16) { islDealerHand = getCards(islDealerHand); renderBoard(islPlayerHand, islDealerHand); checkHand("dealer",...
View ArticleAnswer by paparazzo for Command line Blackjack
The terms are suit and rank. Should have a card class. You do too much logic about a card in the flow code. Should not calcHandTotal(). Hand should just have a public property for the total. Random...
View ArticleAnswer by JanDotNet for Command line Blackjack
Instead ofswitch (choice){ case "n": gameLoop = false; break; default: break;}you could use something like the following:gameLoop = choice != "n";or if you want to ignore cases (which makes sense for...
View ArticleAnswer by BCdotWEB for Command line Blackjack
Don't put all of your code in Program.cs. IMHO that file's Main method should basically do one thing: call a method in a class you wrote yourself.Follow naming guidelines. Classes, enum names, methods...
View ArticleCommand line Blackjack
I'm a C# beginner and this is my try at making a command line Blackjack. I'm aware that the Dealer logic is still far from done, but I wanted to post my code for review.I want to make the code as...
View Article
More Pages to Explore .....