UML poker texas hold'em diagram

322 views
Skip to first unread message

daniele ippoliti

unread,
Nov 12, 2010, 2:05:10 PM11/12/10
to UML Forum
Hello I want to have a guide lines from you about how do you produce
an UML diagram to manage a tournament of poker texas hold'em with a
Table that could have from 2 to 8 players

thank you for your suggestions

daniele ippoliti

Craft, Jim

unread,
Nov 12, 2010, 3:44:54 PM11/12/10
to umlf...@googlegroups.com
By a good UML book, learn it and then do your own homework. How's that for a suggestion?

daniele ippoliti

--
You received this message because you are subscribed to the Google Groups "UML Forum" group.
To post to this group, send email to umlf...@googlegroups.com.
To unsubscribe from this group, send email to umlforum+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/umlforum?hl=en.

daniele ippoliti

unread,
Nov 13, 2010, 4:06:35 AM11/13/10
to umlf...@googlegroups.com
I have already studied UML and i know how it's works moreover I have already done my diagram, I wanted only to know how maybe a person more expert then me would have designed a UML diagram for this application just to have a comparison and to not influence you proposing my solution

Anyway I have done this type of diagram:

Table HASA Player[2..8], Board[1...*];
Player HASA Cards[2];
Board HASA Cards[5];
Card HASA Suit, Deck, int value;
Suit {SPADES, CLUB, DIAMOND; HEARTS}
Round HASA Bet[2..8], Type{PRE-FLOP,FLOP,TURN,RIVER,AFTER-RIVER}
Board HASA Round[1...5]


what do you think????



2010/11/12 Craft, Jim <jim....@lmco.com>

Timothy Marc

unread,
Nov 13, 2010, 4:25:07 AM11/13/10
to umlf...@googlegroups.com
What a barefaced question... sorry, you do not simply asked for help, you
want "us" to do your stuff... I guess you should learn something about
"netiquette" at first.

Timothy

> -----Ursprüngliche Nachricht-----
> Von: umlf...@googlegroups.com [mailto:umlf...@googlegroups.com]
> Im Auftrag von daniele ippoliti
> Gesendet: Freitag, 12. November 2010 20:05
> An: UML Forum
> Betreff: [UML Forum] UML poker texas hold'em diagram

H. S. Lahman

unread,
Nov 13, 2010, 12:30:23 PM11/13/10
to umlf...@googlegroups.com
Responding to ippoliti...


I have already studied UML and i know how it's works moreover I have already done my diagram, I wanted only to know how maybe a person more expert then me would have designed a UML diagram for this application just to have a comparison and to not influence you proposing my solution

Anyway I have done this type of diagram:

Table HASA Player[2..8], Board[1...*];
Player HASA Cards[2];
Board HASA Cards[5];
Card HASA Suit, Deck, int value;
Suit {SPADES, CLUB, DIAMOND; HEARTS}
Round HASA Bet[2..8], Type{PRE-FLOP,FLOP,TURN,RIVER,AFTER-RIVER}
Board HASA Round[1...5]


what do you think????

I'm with Craft; this still wreaks of being a homework problem. That is supported by the fact that the "diagram" is rather naive; typical of a novice student. However, you have done something on your own so here are some things to go back and look up in your course materials...

Decent roles for relationships; 'has' is a terrible role because it has no information content relative to other relationships. Roles do not affect the implementation but they provide valuable insight into the way relationships are navigated during collaborations. Quite often the act of creating good roles provides needed insight into the problem space. IOW, going to the work of creating good roles is more important than the roles themselves. Corollary: put different roles on both ends of the relationship to maximize information content:

<pre>
         1 held by      R1       holds *
[Player] ------------------------------- [Card]

is awful compared to

         1 played by    R1    is dealt *
[Player] ------------------------------- [Card]

</pre>

You need to make clear what are classes and what are attributes (e.g., Suit seems to be both an attribute and a class).

You have no behavior responsibilities; something needs to execute when the app is run.

What will be the flow of control for the game when it is running? Once you have defined behaviors to execute the app, you need to connect the dots between those behaviors in an Interaction Diagram.

You are missing things for Hold 'Em, such as whether it is limit, pot limit, or no limit; what the blinds and antes are; where the button is in a round; etc. IOW, you need to research and capture the problem space better. Hint: go onto a free poker site like PokerStars.net and play a few hands; the log file will provide vital clues about what information you need.

Some things need to be thought through better. For example, how will you handle re-raises within a  betting Round on a given street?

-- 
Life is the only flaw in an otherwise perfect nonexistence
   -- Schopenhauer

H. S. Lahman
H.la...@verizon.net
software blog: http://pathfinderpeople.blogs.com/hslahman/index.html
Reply all
Reply to author
Forward
0 new messages