Quote (carteblanche @ Jul 30 2012 06:22pm)
Code
Double.toString(t.getplayer(1).getstack())
players are named after numbers?
use three layers. your UI should call a controller and ask for the name, then your controller (which tracks app state) should look into the player array and ask the player for its name
Yes the players know which seat they are sitting at as does the hand.
Need some advise about the controller which u mention. Sounds like a good idea. But how does the controller keep track of the state of the JFrame.
At this point my hand class keeps track of the hand, poker rules, players, stacks etc.
The JFrame gives actions via "fold" button, "new hand" button etc.
But I need a way to let the JFrame know certain things. for example: When the players are all in. the hand class need to tell the JFrame to turn one card at a time and pause for a sec.
Alternatively this could be done by a controller. but it still needs to tell the JFrame to update the cards icons.
Dont know if I have made it clear what my problem is. But any constructive advise is valued.
This post was edited by tigeranden on Aug 23 2012 03:42pm