//static int play_lock; /// <summary> /// Plays a single bingo event. /// </summary> /// <param name="State">the state to play - should have used a 'Step' function to get this</param> public void PlayGame(BingoGameState State) { BingoMatchEngine.Play(State); if (opened) { BingoPrize.ComputePrizes(State.game_event, State.game, State.winning_cards); foreach (wininfo win in State.winning_cards) { Local.bingo_tracking.AddWinner(win.playing_card.ID, win.mask, win.amount); } } }
public BingoPrize GetPrize(object key) { if (prizes == null) { prizes = new List <BingoPrize>(); } foreach (BingoPrize prize in prizes) { if (prize.level.Equals(key)) { return(prize); } } { BingoPrize prize; prizes.Add(prize = new BingoPrize(key, 0)); return(prize); } }