0

I am making a poker game (Texas Hold Em) and am wondering if I should be making a static class that controls all AI for simplicity or should I be aiming at making it in itself an instance so that each player could possibly use a different algorithm? I mean it is poker so I suppose there could be a decent scope on strategy but I could probably create a static class that randomly chooses a statistic ratio for their decisions...I don't want a boring AI that is completely predictable

Currently I have a object to represent the cards as strings and when passed a string from an array of card strings it returns its ImageView equivalent, then I have an Object for the rules that dictate what can and can't be currently done as well as analyzing against the community cards for the best hand and returns the type of hand the player has and temporarily stores the cards that made up that hand in case two players have a similar hand and needs to figure out which one wins. Then I have the player class which basically sets whether that player has checked called or folded.

Edit: Also I have rewritten the way cards are dealt about 3x's. I basically am trying to design the game in such a way that different poker styles can be added later and perhaps maybe even blackjack

John Conner
  • 233
  • 1
  • 4
  • 18
  • I explain the behavior as so: "*No* copy/clone/duplicate is made when passing an object to a function or assigning an object to a variable", which neatly answers the main question here. See the linked/duplicate question for as many details and formal explanations of the behavior as desired. – user2864740 Aug 16 '14 at 20:45
  • Alright thanks, i didnt realize it was a duplicate let me re-word the question then – John Conner Aug 16 '14 at 20:47
  • its a poiinter/reference. – NimChimpsky Aug 16 '14 at 20:47
  • Also, make sure to only develop/ask *one* primary focus/question per post - the second paragraph is about something else entirely. – user2864740 Aug 16 '14 at 20:47
  • 1
    Ahh, with those edits it's not a duplicate anymore D: – user2864740 Aug 16 '14 at 20:49
  • Alright, appreciate the feedback – John Conner Aug 16 '14 at 20:49
  • Thanks, i pretty much am just trying to figure out the best approach towards the AI as this is the first real program i have ever created and i wanted to do this before continuing on in this book I'm reading – John Conner Aug 16 '14 at 20:57

1 Answers1

1

I suggest making a PokerPlayer interface which can be implemented in many different ways (including a human player).

Code-Apprentice
  • 81,660
  • 23
  • 145
  • 268