January 20, 200917 yr Hi all, I'm currently working on a bet matching algorithm (similar to Betfair) but am not quite getting the logic right. So far (in psedocode I have): ======================================== Make new Bet(); While new Bet isn't matched (using 'match for count) { Find any potential matches if num of rows > 0 { while potential matches exist (using 'match') { Find least recent match Create new record in matched table() Increase 'match' count on back table Increase 'match' count on lay table } } else { break; } } ======================================== It needs the potential to match 'parts' of bets against each other so that users can cancel bets or parts of unmatched bets. Does anyone have any ideas?
Create an account or sign in to comment