Thread: Help for poker game in C

  1. #1
    Registered User
    Join Date
    Mar 2020
    Posts
    2

    Help for poker game in C

    Hello,
    Currently I am supposed to develop a poker project in C. I am struggling in this part and my teacher won't realy help...
    Each card can be represented by 2 characters: the first character represents its value and the second character represents its suit. Possible values: A, 2, 3, 4, 5, 6, 7, 8, 9, T, J, Q, K. Possible suits: C, E, O, P. There are 10 different combinations (1 - high card, 2 - pair, 3 - two pair, 4 - three of a kind, 5 - straight, 6 - flush, 7 - full house, 8 - four of a kind, 9 - straight flush, 10 - royal flush). The objective is to identify the poker hand (combination) in the 5 cards inserted by the user in the terminal and to write the integer value in stdout accordingly to the identified hand.
    If someone could develop this code, so that I might understand it then itwould greatly help me.
    Tank you for your time.

  2. #2
    Registered User
    Join Date
    Aug 2019
    Location
    inside a singularity
    Posts
    300
    > If someone could develop this code, so that I might understand it then itwould greatly help me.

    No one will write your code for you. You can have your code reviewed and language related concepts cleared here. You must write your own code and make an attempt of your own for someone to help you. Consider coming up with a basic framework of input/output of your program and most likely, someone may help you complete it. If you've been given homework, it's for a reason and considering the question, your teacher believes to have taught you enough of C to implement it, so, good luck!
    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook, The Wizardry Compiled

  3. #3
    Registered User
    Join Date
    May 2010
    Posts
    4,532
    If someone could develop this code
    Perhaps you posted this in the wrong sub-forum? Perhaps you meant to post in the "Projects and Job Recruitment" forum?

    This is your project, you need to do the work.

  4. #4
    Registered User
    Join Date
    Mar 2020
    Posts
    2
    He actually didnīt teach me the concepts because my university got cancelled 1 month ago because of the pandemic, and this work is supposed to be delivered in 2 weeks. So I actually have not learned almost nothing thats necessary for this work, the teacher himself said it, but he can't do anything. Anyways tank you for the reply I will try to do it !

  5. #5
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    27,748
    Quote Originally Posted by Tiago Fernandes
    He actually didnīt teach me the concepts because my university got cancelled 1 month ago because of the pandemic, and this work is supposed to be delivered in 2 weeks. So I actually have not learned almost nothing thats necessary for this work, the teacher himself said it, but he can't do anything.
    I think you need to rally your other students and collectively appeal for some kind of deadline extension until such time that classes have resumed so that you and your classmates can actually be taught according to the syllabus outlined by the lecturer before the start of the semester.

    As it stands, you're on your own as if there was no university and you were doing "work" as a contractor, in which case getting other people to do your work for you by paying them is perfectly fine, and yet it remains true that you are submitting university coursework under your own name, so just getting other people to do your work for you -- even if you pay them fairly -- is still academic dishonesty that I daresay could warrant expulsion from the university.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  6. #6
    Registered User
    Join Date
    Nov 2017
    Posts
    5
    Quote Originally Posted by laserlight View Post
    I think you need to rally your other students and collectively appeal for some kind of deadline extension until such time that classes have resumed so that you and your classmates can actually be taught according to the syllabus outlined by the lecturer before the start of the semester.

    As it stands, you're on your own as if there was no university and you were doing "work" as a contractor, in which case getting other people to do your work for you by paying them is perfectly fine, and yet it remains true that you are submitting university coursework under your own name, so just getting other people to do your work for you -- even if you pay them fairly -- is still academic dishonesty that I daresay could warrant expulsion from the university.

    Agree, just ask for a deadline extension. Also, isn't it possible for your professor to teach you guys online? Work from home is so common these days.

  7. #7
    Registered User
    Join Date
    Dec 2017
    Posts
    933
    Quote Originally Posted by betterbinder View Post
    Agree, just ask for a deadline extension. Also, isn't it possible for your professor to teach you guys online? Work from home is so common these days.
    Look at all three posts by this weirdo, this post and the following two, all posted at about the same time.
    They are all meaningless garbage and remind me of the kind of useless add-on comments that spammers sometimes use to get past the first few posts.

    how read an image file?

    How to configure VS Code for building and compiling C++ by Control-Shift-B?
    If you want the truth to stand clear before you, never be for or against. - Sent-ts'an

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Poker Game
    By mp252 in forum C++ Programming
    Replies: 4
    Last Post: 04-29-2013, 11:36 AM
  2. Help with Poker Game
    By Eulogy in forum C Programming
    Replies: 3
    Last Post: 10-24-2012, 01:15 AM
  3. Poker Game need help...
    By boyracer88 in forum Game Programming
    Replies: 1
    Last Post: 11-25-2005, 01:32 PM
  4. Poker Game
    By Smiley**123 in forum Game Programming
    Replies: 6
    Last Post: 12-14-2003, 09:48 AM
  5. poker game help
    By datainjector in forum C Programming
    Replies: 5
    Last Post: 09-06-2002, 07:31 AM

Tags for this Thread