In July, the state government announced that if the clubs agreed to merge, it would allow an animated horse racing game, Trackside, owned by the gambling agency Tabcorp, into pubs and clubs. Revenue would be used to repay a $150 million loan to fund the upgrade of the AJC-run Randwick racecourse. A separate $24 million grant would go to Rosehill racecourse, run by the STC. Last week AJC members voted for the merger. But in a last-minute deal on Sunday, Tabcorp agreed to provide the $150 million in return for the industry's share of the revenue from Trackside. It is understood the agreement, between Tabcorp and Racing NSW, was designed to allay fears that the industry would struggle to repay the $150 million debt if revenue from Trackside was less than anticipated.