Fantasy-Lottery
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:download file, make sure the container folder is in your $LOAD_PATH, require 'fantasy_lottery' and now in irb you're ready to create & play the lottery. For the California lottery, the 3 most popular games are Mega Millions, SuperLotto Plus, and Fantasy 5. The difference between these games are the number of components per ticket, and, within each component, the maximum range of numbers to pick from, the quantity of picks from the number pool, and the winning floor. To make things simple, we'll start with Fantasy 5, because it has only 1 component. Within this component, the maximum range is 39, the quantity of picks is 5, and at least 2 of your numbers must match the winning numbers in order for your ticket to be a winner. To create an instance of a Fantasy 5 lottery ticket, run the following incantation: LotteryTicket.new(LotteryGame.new('Fantasy 5', [[39, 5, 2]]))). If, instead of letting the computer pick your numbers, you would like to supply your own numbers, call: LotteryTicket.new(LotteryGame.new('Fantasy 5', [[39, 5, 2]]), 1, 2, 3, 4, 5)).
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。