public Match(int id, string teamA, float oddsA, string teamB, float oddsB, float oddsDraw, float limit, Bookie owningBookie) { this.ID = id; this.TeamA = teamA; this.OddsA = oddsA; this.OddsB = oddsB; this.TeamB = teamB; this.Limit = limit; this.OddsDraw = oddsDraw; OpenMatch = true; this._owningBookie = owningBookie; }
/// <summary> /// Connects to the bookie with the address and port number specified /// </summary> /// <param name="gambler">The connecting gambler</param> /// <param name="address">The address of the bookie to connect to</param> /// <param name="portNo">The port number of the bookie to connect to</param> public void connectBookie(Model.Gambler gambler, IPAddress address, int portNo) { Model.Bookie b = new Model.Bookie(gambler, address, portNo); lock (lockObj) { _listOfBookies.Add(b); } b.ListOfMatches.CollectionChanged += handleNewMatch; b.ListOfBets.CollectionChanged += handleNewBet; b.ListOfWinnings.CollectionChanged += handleNewWinnings; }