Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 655319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:35:26+00:00 2026-05-13T22:35:26+00:00

I am implementing a little Black Jack game in C# and I have the

  • 0

I am implementing a little Black Jack game in C# and I have the following problem calculating the player’s hand value. Aces may have a value of 1 or 11 based on the player’s hand. If the player has three cards and one ace, then if the sum of the cards is <= 10 the ace will have value of 11, otherwise it will have a value of 1.

Now lets assume I do not know how many aces the player has got and the game is implemented giving the possibility to the dealer to use more than one deck of cards. The user may have in one hand even 5, 6, 7, 8… aces.

What is the best way (possibly using Linq) to evaluate all the aces the player has got to get the closest combination to 21 (in addition to the other cards)?

I know the players’ cards and I want to calculate their values, using the aces to reach the closest value to 21.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T22:35:26+00:00Added an answer on May 13, 2026 at 10:35 pm

    Add up the value of all the non-aces and add the number of aces: 2, Q, A, A = 2 + 10 + (2) = 14

    Then subtract that from 21: 21 – 14 = 7

    Is this number less than 10 (if only 1 ace == 11)? Less than 20 (if both aces == 11)?

    Since this feels like homework, this is intentionally not the complete answer but should guide you along.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a little problem in Eclipse with auto-implementing interface methods for example HibernateTemplate
I have a little problem with implementing in-page HTML anchors while also having bookmarkable
inspired by Clojure, and Peter Norvig I have been trying my hand at implementing
I'm having a little problem implementing some jQuery into a page I am doing.
For a personal MMO game project I am implementing a homebrew reliable UDP-based protocol
I have little experience with web programming and I am implementing an interface where
I'm implementing a REST API using ASP.NET MVC, and a little stumbling block has
I am implementing a little extension for an existing application. Now I am creating
I'm implementing a little chat application where I receive messages from a server, which
I'm busy introducing myself to jQuery by implementing a little system where onmouseover on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.