Wednesday, 23 November 2011

Java: Texas Hold Em (8)

To comments: Yeah, going to work on base functionality before everything else, then add in the visual and actual user interactivity. Also, thanks for info on the blinds!

So today I wanted to start on the HandEvaluation, since it is a rather big class. Complex, kind of, but mostly just big (As far as I know, which revolved entirely around guesswork), but the enumeration to hold the types of hand values is probably better off in its own class. It's similar to the Action we had yesterday, take a look:



(I'm fairly useless at remembering the hand types, so I left in comments to help me remember. Mr. Stigter (The man who's work I'm partially jacking) pretty much had this class perfect, so apart from a few comments and whitespace, its a direct copy)


Going through them, we see an almost-mirror of the action class, the enumeration listing all the hand-types and how much they're worth relative to each other...


...followed by a constructor, and the get methods that we've come to expect from everything.

Honestly, today's workload was...not a workload, so I'd like to do more, but with the pictures, the post already looks huge and its a shame if it gets to be too long and stuff, so I guess I'll just work ahead of myself instead, and post the start of the HandEvaluator class tomorrow. Hopefully, it'll be a little more bang for buck!

See you tomorrow! Comments and questions welcome, as always!

5 comments:

  1. leaving java aside, i seriously love texas hold em haha, but im bad at programing/scripting :(

    ReplyDelete
  2. Ah, I like how the different hands are given numbers 0-9, that makes a lot of sense!

    ReplyDelete
  3. Wow this is coming along nicely!

    ReplyDelete