internal BingoDealer( DataRow range ) { DataTable ranges = range.Table; OpenSkieScheduler3.ScheduleDataSet schedule = ranges.DataSet as OpenSkieScheduler3.ScheduleDataSet; DataRow cardset_row = range.GetParentRow( CardsetRange.CardsetInfoRelationName ); DataRow dealer_row = range.GetParentRow( CardsetRange.DealerRelationName ); if( cardset_row["name"] != DBNull.Value && cardset_row["name"] != "" ) card_data = CardReader.GetCardReader( range ); else card_data = CardSQLReader.GetCardReader( range ); //BingoCardset bingo_cardset = null; DataRow cardset = range.GetParentRow( "cardset_has_cardset_range" ); DataRow dealerRow = range.GetParentRow( "cardset_range_has_dealer" ); RangeName = range[CardsetRange.NameColumn] as String; CardsetName = cardset[CardsetInfo.NameColumn] as String; DealerName = dealerRow[Dealer.NameColumn] as String; prize_level_id = range[PrizeLevelNames.PrimaryKey]; //pack = Convert.ToInt32( pack[PackTable.PrimaryKey] ); min_range = Convert.ToInt32( range["start"] ); max_range = Convert.ToInt32( range["end"] ); object tmp_base = range["base"]; if( tmp_base == DBNull.Value ) packs_db_base = 0; else packs_db_base = Convert.ToInt32( tmp_base ); //Name = range[CardsetRange.NameColumn].ToString(); if( dealerRow != null ) { card_skip = Convert.ToInt32( dealerRow["card_skip"] ); game_skip = Convert.ToInt32( dealerRow["page_skip"] ); row_skip = Convert.ToInt32( dealerRow["row_skip"] ); column_skip = Convert.ToInt32( dealerRow["column_skip"] ); } else Log.log( "cardset_range has no dealer... default dealer cardskip=" + card_skip + " gameskip=" + game_skip ); //bingo_cardset.range_base = Convert.ToInt32( range["base"] ); object tmp_offset = range["offset"]; if( tmp_offset == DBNull.Value ) card_offset = 0; else card_offset = Convert.ToInt32( tmp_offset ); real_min_range = min_range + packs_db_base; real_max_range = max_range + packs_db_base; last_dealt = real_min_range; group_wrap_games = false; //cardset = bingo_cardset; }
public BingoDealer( String name ) { CardsetName = "No Cardset"; DealerName = name; RangeName = "Internal"; card_skip = 50; game_skip = 1; min_range = 1; // 1 billion maximum cards? max_range = 400000; card_data = new CardMaster.CardFactory(); last_dealt = min_range; //cardset = card_set; }
public BingoDealer( String name, int upick_size ) { CardsetName = "No Cardset"; DealerName = name; RangeName = "Internal"; card_skip = 50; game_skip = 1; min_range = 1; // 1 billion maximum cards? max_range = 400000; this.upick_size = upick_size; card_data = new CardMaster.UPickFactory( upick_size ); last_dealt = min_range; //cardset = card_set; }
dealer.RangeName == RangeName && dealer.DealerName == DealerName ) return dealer; } //BingoCardset new_cardset = new BingoCardset(); BingoDealer new_dealer = new BingoDealer( dataRowCardsetRange ); dealers.Add( new_dealer ); return new_dealer; } public static BingoDealer GetDealer( CardMaster.CardData cards, int card_skip, int page_skip ) { return null; #if asdfadfs foreach( BingoCardset dealer in dealers ) { if( dealer.card_data == cards ) { foreach( BingoDealer d in dealer ) { if( d.card_skip == card_skip && d.game_skip == page_skip ) return d; } BingoDealer new_dealer; new_dealer = new BingoDealer( dealer, "Internal " + card_skip.ToString() + ":" + page_skip.ToString() ); //new_dealer.prize_level_id = null; new_dealer.card_offset = 0; new_dealer.card_skip = card_skip; new_dealer.game_skip = page_skip; dealer.Add( new_dealer ); return new_dealer; //new_dealer.min_range = } }
internal BingoCardset( String file, bool big3 ) { int try_count = 0; retry: try { card_data = CardMaster.CardReader.GetCardReader( file, big3 ); } catch( FileNotFoundException e ) { if( try_count >= 15 ) { MessageBox.Show( "Failed to open card file [" + file + "]\nDefaulting to random card generation\nWait was 15 seconds..." ); card_data = new CardMaster.CardFactory(); } else { Log.log( "Failed to open cardfile ["+file+"], sleep one second, and retry..." ); Thread.Sleep( 1000 ); try_count++; goto retry; } } }
internal BingoCardset() { card_data = new CardMaster.CardFactory(); }