O'Reilly Forums: Advanced Day At The Races Lab - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Advanced Day At The Races Lab Use this for ideas if you want to get a little creative

#1 User is offline   SD11089 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 10-November 12

Posted 10 November 2012 - 11:45 AM

I just wanted to show what I did with the Day at the Races lab as compared to what is listed in the book

Posted Image Posted Image

I added in a handicap which takes into account the average speed, time, wins and losses for all races for each dog as well as whether or not the dog became exhausted from the prior race. I also changed the color of the dogs (and added a 5th dog), The stats bar to the right lists both stats from the prior race and stats over the dogs' lifetimes. At the bottom is a historical winners bar which includes the dogs name and time the dog won the race by.

The book uses a random amount for each stride, I found the races ran much smoother creating a speed variable for each dog, and adding to it with an acceleration variable (which maxed out at a set limit).

I also created a betting window class rather than a bets class which counts down to the next race, posts to the historical winners board, sets the odds, and starts the race when its timer reaches 0.

If anyone has any questions feel free to ask.

-Stephen
0

#2 User is offline   Sikta_26785 

  • Active Member
  • PipPipPip
  • Group: Members
  • Posts: 67
  • Joined: 18-May 11

Posted 21 November 2012 - 04:01 PM

That looks really nice. Good Job! I definitely need to work on my UI skills.
0

#3 User is offline   MunyaChasumba 

  • New Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 08-January 13

Posted 14 January 2013 - 05:29 AM

Awesome app, can you uploaded working version of this app?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users