drneau.com Forum Index drneau.com
A discussion board for drneau.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Update: Fixed Break

 
Post new topic   Reply to topic    drneau.com Forum Index -> Development and Release News
View previous topic :: View next topic  
Author Message
drneau
Site Admin


Joined: 13 Feb 2005
Posts: 2385
Location: Woodbury, MN

PostPosted: Sun Oct 28, 2007 7:59 am    Post subject: Update: Fixed Break Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
drneau
Site Admin


Joined: 13 Feb 2005
Posts: 2385
Location: Woodbury, MN

PostPosted: Mon Oct 29, 2007 9:41 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Addicted
"Cowboys"


Joined: 08 Jan 2006
Posts: 46
Location: Mokena, Illinois

PostPosted: Mon Oct 29, 2007 12:35 pm    Post subject: Reply with quote

I have no idea what you just said.
Back to top
View user's profile Send private message
i8dbear
Founding Father
Founding Father


Joined: 22 Feb 2005
Posts: 181
Location: Los Angeles

PostPosted: Fri Nov 16, 2007 6:45 pm    Post subject: Reply with quote

if the Doc says it's cool, it's cool. Go Doc! Cool
Back to top
View user's profile Send private message
boschie
"A Set of Mop Squeezers"


Joined: 11 Apr 2007
Posts: 51
Location: Gramsbergen, Nederland

PostPosted: Sat Nov 17, 2007 6:59 am    Post subject: Reply with quote

i8dbear wrote:
if the Doc says it's cool, it's cool. Go Doc! Cool


You tell'em i8dbear... Laughing
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    drneau.com Forum Index -> Development and Release News All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group