View Single Post
  #14 (permalink)  
Old 07-01-2009, 03:14 PM
Ciege's Avatar
Ciege
PPCGeeks Regular
Offline
Threadstarter
 
Join Date: Apr 2007
Posts: 92
Reputation: 35
Ciege is just getting started
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Holdem Tournament Timer App?

What I did was use some math with weighted percentages to determine how to distribute the chip count.

Since I had more chips of the lowest denomination I gave it a higher percentage to distribute to (say 25%). Other percentages where then applied to the other chip values. When the initial pass was completed I checked what remainder was left that I needed to fulfill. I then would fulfill that remainder with remaining chip values that would use the least amount of physical chips.

I.e.
) first pass would get as close to $1500 worth of chips without going over using the percentages for each chip value.
) second pass would determine how much was left to distribute, then determine what chips could fulfill that amount using the least amount of chips possible
) finally it would allocate that amount


This is probably a lot more work than necessary for this app. And can be tabled. But might be a fun exercise in the future to attempt to tackle.
Reply With Quote