View previous topic :: View next topic |
Author |
Message |
drneau Site Admin
Joined: 13 Feb 2005 Posts: 2385 Location: Woodbury, MN
|
Posted: Sun Oct 28, 2007 7:59 am Post subject: Update: Fixed Break |
|
|
Just an update.
I've been spending a lot of time in the last two weeks implementing the concept of a "Fixed Break".
You'll have your standard betting schedule, with Pre-Tournament segments, Play segments and Break segments...but you'll now also have the ability to have "Fixed Breaks". For example, schedule a break that starts at 6:55pm and ends at 7:30pm.
Along with this, I'm also implementing an "estimated start time" and "estimated end time" for each level...based on the current time and where you are in schedule. These estimated times also take fixed breaks into account. The next logical step is estimating the exact time your tournament will end, taking into account the start time, breaks, estimated number of players, total value of chips in play and the betting levels. Fun!
Implementing this introduces new challenges I'm dealing with:
- Handling a play segment being interrupted by a fixed break and handling resuming the play segment at the right point.
- Accurately reflecting which break is next (a normal break or a fixed break).
- Scheduling the updates of all estimates (done via a background job...and these needs to be done even when the timer isn't running!)
- Etc.
This is probably the most difficult task remaining. _________________ --
Dr. Neau (not a real doctor)
http://drneau.com
http://home.comcast.net/~jneau |
|
Back to top |
|
|
drneau Site Admin
Joined: 13 Feb 2005 Posts: 2385 Location: Woodbury, MN
|
Posted: Mon Oct 29, 2007 9:41 am Post subject: |
|
|
OMG.
Going inside the mind of a programming geek...warning...
java.util.Timer is your friend. Finding this class saved me a LOT of headache.
Here's what I do...
Each time a new fixed break is added or a fixed break start time is modified, I cancel and reschedule all fixed break timers.
Scheduling a fixed break timer is simple:
- Get the time of day the break is planned to start
- Get the next occurance of that
- Schedule a task in java.util.Timer with a reference to that break
Then, when the trigger fires, the task just tells the betting schedule to jump to that break. The betting schedule will handle the interrupting of the current schedule, where to resume, etc.
This is cool. _________________ --
Dr. Neau (not a real doctor)
http://drneau.com
http://home.comcast.net/~jneau |
|
Back to top |
|
|
Addicted "Cowboys"
Joined: 08 Jan 2006 Posts: 46 Location: Mokena, Illinois
|
Posted: Mon Oct 29, 2007 12:35 pm Post subject: |
|
|
I have no idea what you just said. |
|
Back to top |
|
|
i8dbear Founding Father
Joined: 22 Feb 2005 Posts: 181 Location: Los Angeles
|
Posted: Fri Nov 16, 2007 6:45 pm Post subject: |
|
|
if the Doc says it's cool, it's cool. Go Doc! |
|
Back to top |
|
|
boschie "A Set of Mop Squeezers"
Joined: 11 Apr 2007 Posts: 51 Location: Gramsbergen, Nederland
|
Posted: Sat Nov 17, 2007 6:59 am Post subject: |
|
|
i8dbear wrote: | if the Doc says it's cool, it's cool. Go Doc! |
You tell'em i8dbear... |
|
Back to top |
|
|
|