// (c) Sam Gratrix.


// ===========================================================================================================
// Construct objects that hold the fundamental lottery data.


var lottos = new Array(

new Lotto(
  'au', "Oz Lotteries - Tuesday Super 7's Lotto", "(7+2) / 45", new Rational(1,1), new Rational(1,2),
  new Array(
  new LottoMatch('7 Main'                      , new Rational(0,1), 0, [[new Contingency([[7,0],[0,0],[0,38]])]]),
//new LottoMatch('6 Main And 1 Supplementary'  , new Rational(0,1), 0, [[new Contingency([[6,1],[1,1],[0,36]])]]),
  new LottoMatch('6 Main And Any Supplementary', new Rational(0,1), 0, [[new Contingency([[6,1],[1,1],[0,36]])]]),
  new LottoMatch('6 Main'                      , new Rational(0,1), 0, [[new Contingency([[6,1],[0,2],[1,35]])]]),
//new LottoMatch('5 Main And 2 Supplementary'  , new Rational(0,1), 0, [[new Contingency([[5,2],[2,0],[0,36]])]]),
//new LottoMatch('5 Main And 1 Supplementary'  , new Rational(0,1), 0, [[new Contingency([[5,2],[1,1],[1,35]])]]),
  new LottoMatch('5 Main And Any Supplementary', new Rational(0,1), 0, [[new Contingency([[5,2],[2,0],[0,36]])],[new Contingency([[5,2],[1,1],[1,35]])]]),
  new LottoMatch('5 Main'                      , new Rational(0,1), 0, [[new Contingency([[5,2],[0,2],[2,34]])]]),
  new LottoMatch('4 Main'                      , new Rational(0,1), 0, [[new Contingency([[4,3],[0,0],[3,35]])]]),
//new LottoMatch('3 Main And 2 Supplementary'  , new Rational(0,1), 0, [[new Contingency([[3,4],[2,0],[2,34]])]]),
//new LottoMatch('3 Main And 1 Supplementary'  , new Rational(0,1), 0, [[new Contingency([[3,4],[1,1],[3,33]])]]),
  new LottoMatch('3 Main And Any Supplementary', new Rational(0,1), 0, [[new Contingency([[3,4],[2,0],[2,34]])],[new Contingency([[3,4],[1,1],[3,33]])]]))
  ),

new Lotto(
  'au', "Oz Lotteries - Thursday Powerball", "5/45 + 1/45", new Rational(2,1), new Rational(1,2),
  new Array(
  new LottoMatch('5 Main And Powerball', new Rational(0,1), 0, [[new Contingency([[5, 0],[0, 40]]), new Contingency([[1, 0],[0, 44]])]]),
  new LottoMatch('5 Main'              , new Rational(0,1), 0, [[new Contingency([[5, 0],[0, 40]]), new Contingency([[0, 1],[1, 43]])]]),
  new LottoMatch('4 Main And Powerball', new Rational(0,1), 0, [[new Contingency([[4, 1],[1, 39]]), new Contingency([[1, 0],[0, 44]])]]),
  new LottoMatch('3 Main And Powerball', new Rational(0,1), 0, [[new Contingency([[3, 2],[2, 38]]), new Contingency([[1, 0],[0, 44]])]]),
  new LottoMatch('4 Main'              , new Rational(0,1), 0, [[new Contingency([[4, 1],[1, 39]]), new Contingency([[0, 1],[1, 43]])]]),
  new LottoMatch('2 Main And Powerball', new Rational(0,1), 0, [[new Contingency([[2, 3],[3, 37]]), new Contingency([[1, 0],[0, 44]])]]),
  new LottoMatch('3 Main'              , new Rational(0,1), 0, [[new Contingency([[3, 2],[2, 38]]), new Contingency([[0, 1],[1, 43]])]]))
  ),

new Lotto(
  'au', "Oz Lotteries - Saturday Lotto", "(6+2) / 45", new Rational(1,1), new Rational(1,2),
  new Array(
  new LottoMatch('6 Main'                      , new Rational(0,1), 0, [[new Contingency([[6,0],[0,0],[0,39]])]]),
//new LottoMatch('5 Main And 1 Supplementary'  , new Rational(0,1), 0, [[new Contingency([[5,1],[1,1],[0,37]])]]),
  new LottoMatch('5 Main And Any Supplementary', new Rational(0,1), 0, [[new Contingency([[5,1],[1,1],[0,37]])]]),
  new LottoMatch('5 Main'                      , new Rational(0,1), 0, [[new Contingency([[5,1],[0,2],[1,36]])]]),
  new LottoMatch('4 Main'                      , new Rational(0,1), 0, [[new Contingency([[4,2],[0,0],[2,37]])]]),
//new LottoMatch('3 Main And 2 Supplementary'  , new Rational(0,1), 0, [[new Contingency([[3,3],[2,0],[1,36]])]]),
//new LottoMatch('3 Main And 1 Supplementary'  , new Rational(0,1), 0, [[new Contingency([[3,3],[1,1],[2,35]])]]),
  new LottoMatch('3 Main And Any Supplementary', new Rational(0,1), 0, [[new Contingency([[3,3],[2,0],[1,36]])],[new Contingency([[3,3],[1,1],[2,35]])]]))
  ),

new Lotto(
  'eu', "EuroMillions", "5/50 + 2/9", new Rational(2,1), new Rational(1,2),
  new Array(
  new LottoMatch('5 Main And 2 Stars', new Rational(0,1), 380, [[new Contingency([[5, 0], [0, 45]]), new Contingency([[2, 0], [0, 7]])]]),
  new LottoMatch('5 Main And 1 Star' , new Rational(0,1),  74, [[new Contingency([[5, 0], [0, 45]]), new Contingency([[1, 1], [1, 6]])]]),
  new LottoMatch('5 Main'            , new Rational(0,1),  21, [[new Contingency([[5, 0], [0, 45]]), new Contingency([[0, 2], [2, 5]])]]),
  new LottoMatch('4 Main And 2 Stars', new Rational(0,1),  15, [[new Contingency([[4, 1], [1, 44]]), new Contingency([[2, 0], [0, 7]])]]),
  new LottoMatch('4 Main And 1 Star' , new Rational(0,1),  10, [[new Contingency([[4, 1], [1, 44]]), new Contingency([[1, 1], [1, 6]])]]),
  new LottoMatch('4 Main'            , new Rational(0,1),   7, [[new Contingency([[4, 1], [1, 44]]), new Contingency([[0, 2], [2, 5]])]]),
  new LottoMatch('3 Main And 2 Stars', new Rational(0,1),  10, [[new Contingency([[3, 2], [2, 43]]), new Contingency([[2, 0], [0, 7]])]]),
  new LottoMatch('3 Main And 1 Star' , new Rational(0,1),  51, [[new Contingency([[3, 2], [2, 43]]), new Contingency([[1, 1], [1, 6]])]]),
  new LottoMatch('2 Main And 2 Stars', new Rational(0,1),  44, [[new Contingency([[2, 3], [3, 42]]), new Contingency([[2, 0], [0, 7]])]]),
  new LottoMatch('3 Main'            , new Rational(0,1),  47, [[new Contingency([[3, 2], [2, 43]]), new Contingency([[0, 2], [2, 5]])]]),
  new LottoMatch('1 Main And 2 Stars', new Rational(0,1), 101, [[new Contingency([[1, 4], [4, 41]]), new Contingency([[2, 0], [0, 7]])]]),
  new LottoMatch('2 Main And 1 Star' , new Rational(0,1), 240, [[new Contingency([[2, 3], [3, 42]]), new Contingency([[1, 1], [1, 6]])]]))
  ),

new Lotto(
  'fr', "Super Loto", "(6+1) / 49", new Rational(3,2), new Rational(50,100),
  new Array(
  new LottoMatch('6 Main'          , new Rational(0,1), 0, [[new Contingency([[6,0],[0,0],[0,43]])]]),
  new LottoMatch('5 Main And Bonus', new Rational(0,1), 0, [[new Contingency([[5,1],[1,0],[0,42]])]]),
  new LottoMatch('5 Main'          , new Rational(0,1), 0, [[new Contingency([[5,1],[0,1],[1,41]])]]),
  new LottoMatch('4 Main And Bonus', new Rational(0,1), 0, [[new Contingency([[4,2],[1,0],[1,41]])]]),
  new LottoMatch('4 Main'          , new Rational(0,1), 0, [[new Contingency([[4,2],[0,1],[2,40]])]]),
  new LottoMatch('3 Main And Bonus', new Rational(0,1), 0, [[new Contingency([[3,3],[1,0],[2,40]])]]),
  new LottoMatch('3 Main'          , new Rational(0,1), 0, [[new Contingency([[3,3],[0,1],[3,39]])]]))
  ),

new Lotto(
  'ie', "Lotto", "(6+1) / 45", new Rational(3,2), new Rational(52,100),
  new Array(
  new LottoMatch('6 Main'          , new Rational(2774046,1),   0, [[new Contingency([[6,0],[0,0],[0,39]])]]),
  new LottoMatch('5 Main And Bonus', new Rational(  25000,1),   0, [[new Contingency([[5,1],[1,0],[0,38]])]]),
  new LottoMatch('5 Main'          , new Rational(      0,1), 538, [[new Contingency([[5,1],[0,1],[1,37]])]]),
  new LottoMatch('4 Main And Bonus', new Rational(      0,1), 135, [[new Contingency([[4,2],[1,0],[1,37]])]]),
  new LottoMatch('4 Main'          , new Rational(      0,1), 830, [[new Contingency([[4,2],[0,1],[2,36]])]]),
  new LottoMatch('3 Main And Bonus', new Rational(      0,1), 553, [[new Contingency([[3,3],[1,0],[2,36]])]]),
  new LottoMatch('3 Main'          , new Rational(      5,1),   0, [[new Contingency([[3,3],[0,1],[3,35]])]]))
  ),

new Lotto(
  'es', "Spanish Lottery - Sunday 5/54 + 1", "5/54 + 1/10", new Rational(1,1), new Rational(55,100),
  new Array(
  new LottoMatch('5 Main And Key', new Rational(0,1), 0, [[new Contingency([[5, 0], [0, 49]]), new Contingency([[1, 0], [0, 9]])]]),
  new LottoMatch('5 Main'        , new Rational(0,1), 0, [[new Contingency([[5, 0], [0, 49]]), new Contingency([[0, 1], [1, 8]])]]),
  new LottoMatch('4 Main And Key', new Rational(0,1), 0, [[new Contingency([[4, 1], [1, 48]]), new Contingency([[1, 0], [0, 9]])]]),
  new LottoMatch('4 Main'        , new Rational(0,1), 0, [[new Contingency([[4, 1], [1, 48]]), new Contingency([[0, 1], [1, 8]])]]),
  new LottoMatch('3 Main And Key', new Rational(0,1), 0, [[new Contingency([[3, 2], [2, 47]]), new Contingency([[1, 0], [0, 9]])]]),
  new LottoMatch('3 Main'        , new Rational(0,1), 0, [[new Contingency([[3, 2], [2, 47]]), new Contingency([[0, 1], [1, 8]])]]),
  new LottoMatch('2 Main And Key', new Rational(0,1), 0, [[new Contingency([[2, 3], [3, 46]]), new Contingency([[1, 0], [0, 9]])]]),
  new LottoMatch('2 Main'        , new Rational(0,1), 0, [[new Contingency([[2, 3], [3, 46]]), new Contingency([[0, 1], [1, 8]])]]),
  new LottoMatch('Key'           , new Rational(0,1), 0, [[new Contingency([[0, 5], [5, 44]]), new Contingency([[1, 0], [0, 9]])]]))
  ),

new Lotto(
  'uk', "The National Lottery - Lotto", "(6+1) / 49", new Rational(1,1), new Rational(45,100),
  new Array(
  new LottoMatch('6 Main'          , new Rational( 0,1), 52, [[new Contingency([[6,0],[0,0],[0,43]])]]),
  new LottoMatch('5 Main And Bonus', new Rational( 0,1), 16, [[new Contingency([[5,1],[1,0],[0,42]])]]),
  new LottoMatch('5 Main'          , new Rational( 0,1), 10, [[new Contingency([[5,1],[0,1],[1,41]])]]),
  new LottoMatch('4 Main'          , new Rational( 0,1), 22, [[new Contingency([[4,2],[0,0],[2,41]])]]),
  new LottoMatch('3 Main'          , new Rational(10,1),  0, [[new Contingency([[3,3],[0,0],[3,40]])]]))
  ),

new Lotto(
  'uk', "The National Lottery - Thunderball", "5/34 + 1/14", new Rational(1,1), new Rational(2107925,3895584),
  new Array(
  new LottoMatch('5 Main And Thunderball', new Rational(250000,1), 0, [[new Contingency([[5, 0], [0, 29]]), new Contingency([[1, 0], [0, 13]])]]),
  new LottoMatch('5 Main'                , new Rational(  5000,1), 0, [[new Contingency([[5, 0], [0, 29]]), new Contingency([[0, 1], [1, 12]])]]),
  new LottoMatch('4 Main And Thunderball', new Rational(   250,1), 0, [[new Contingency([[4, 1], [1, 28]]), new Contingency([[1, 0], [0, 13]])]]),
  new LottoMatch('4 Main'                , new Rational(   100,1), 0, [[new Contingency([[4, 1], [1, 28]]), new Contingency([[0, 1], [1, 12]])]]),
  new LottoMatch('3 Main And Thunderball', new Rational(    20,1), 0, [[new Contingency([[3, 2], [2, 27]]), new Contingency([[1, 0], [0, 13]])]]),
  new LottoMatch('2 Main And Thunderball', new Rational(    10,1), 0, [[new Contingency([[2, 3], [3, 26]]), new Contingency([[1, 0], [0, 13]])]]),
  new LottoMatch('3 Main'                , new Rational(    10,1), 0, [[new Contingency([[3, 2], [2, 27]]), new Contingency([[0, 1], [1, 12]])]]),
  new LottoMatch('1 Main And Thunderball', new Rational(     5,1), 0, [[new Contingency([[1, 4], [4, 25]]), new Contingency([[1, 0], [0, 13]])]]))
  ),

new Lotto(
  'us', "Texas Lottery - Lotto Texas", "6/54", new Rational(1,1), new Rational(1,2),
  new Array(
  new LottoMatch('6', new Rational(0,1), 1, [[new Contingency([[6, 0],[0, 48]])]]),
  new LottoMatch('5', new Rational(0,1), 1, [[new Contingency([[5, 1],[1, 47]])]]),
  new LottoMatch('4', new Rational(0,1), 1, [[new Contingency([[4, 2],[2, 46]])]]),
  new LottoMatch('3', new Rational(3,1), 0, [[new Contingency([[3, 3],[3, 45]])]]))
  ),

new Lotto(
  'us', "Texas Lottery - Cash Five", "5/37", new Rational(1,1), new Rational(1,2),
  new Array(
  new LottoMatch('5', new Rational(0,1), 1, [[new Contingency([[5, 0],[0, 32]])]]),
  new LottoMatch('4', new Rational(0,1), 1, [[new Contingency([[4, 1],[1, 31]])]]),
  new LottoMatch('3', new Rational(0,1), 1, [[new Contingency([[3, 2],[2, 30]])]]),
  new LottoMatch('2', new Rational(2,1), 0, [[new Contingency([[2, 3],[3, 29]])]]))
  ),

new Lotto(
  'us', "Texas Lottery - Texas Two Step", "4/35 + 1/35", new Rational(2,1), new Rational(1,2),
  new Array(
  new LottoMatch('4 Main And Bonus', new Rational(200000,1), 0, [[new Contingency([[4, 0],[0, 31]]), new Contingency([[1, 0],[0, 34]])]]),
  new LottoMatch('4 Main'          , new Rational(     0,1), 1, [[new Contingency([[4, 0],[0, 31]]), new Contingency([[0, 1],[1, 33]])]]),
  new LottoMatch('3 Main And Bonus', new Rational(     0,1), 1, [[new Contingency([[3, 1],[1, 30]]), new Contingency([[1, 0],[0, 34]])]]),
  new LottoMatch('2 Main And Bonus', new Rational(     0,1), 1, [[new Contingency([[2, 2],[2, 29]]), new Contingency([[1, 0],[0, 34]])]]),
  new LottoMatch('3 Main'          , new Rational(     0,1), 1, [[new Contingency([[3, 1],[1, 30]]), new Contingency([[0, 1],[1, 33]])]]),
  new LottoMatch('1 Main And Bonus', new Rational(     7,1), 0, [[new Contingency([[1, 3],[3, 28]]), new Contingency([[1, 0],[0, 34]])]]),
  new LottoMatch('Bonus'           , new Rational(     5,1), 0, [[new Contingency([[0, 4],[4, 27]]), new Contingency([[1, 0],[0, 34]])]]))
  )
);

