📄 lottery.cpp
字号:
/****************************************************************************/
/* Doctor Lottery's Engine */
/* ------ */
/* This program may be distributed freely within the following restrictions:*/
/* */
/* 1) You may not charge for this program or for any part of it. */
/* 2) This copyright message must be distributed with all copies. */
/* 3) This program must be distributed complete with source code. Binary */
/* only distribution is not permitted. */
/* 4) The author offers no warrenties, or guarentees etc. - you use it at */
/* your own risk. If it messes something up or destroys your computer */
/* thats YOUR problem. */
/* 5) You may use small sections of code from this program in your own */
/* applications - but you must acknowledge its use. If you plan to use */
/* large sections then please ask the author. jasonbennison@hotmail.com */
/* */
/* If you do not agree with any of the above then please do not use this */
/* program. */
/****************************************************************************/
#include <stdlib.h>
#include <time.h>
#include <iostream.h>
/*
THIS NEEDS TO BE RE-SCRIPTED TO TAKE INTO ACCOUNT CAMELOT'S NEW THUNDERBALL GAME!
SOURCE CODE IS WRITTEN FOR USE UNDER MICROSOFT VISUAL C++ (DOS SOURCE FILE) BUT WILL WORK OK USING
BORLAND C++ BUT WILL HAVE A LIMITED VOLUME OF CONTINUOUS DRAWS...(16 BIT).
*/
//Content of "crap.h" Open new header file, place this in it.
void DisplayResults(void);
int GetRandomPlayerNumbers(void);
int GetRandomLotteryNumbers(void);
int MatchNumbers();
void Enter2KeyNumbers();
void Get2KeyNumbers();
void CollateAverageSix();
int GetLotteryResults();
int GetUserInput();
int TestEngine();
int SortCollatedLotteryNumbers();
int GetAndMatchBonus();
int GetFullSelection();
void EnterLotteryNumbers();
void CalcSpend();
int GetUserFixedNumbers();
int EnterUserFixedNumbers();
void EnterAverageSix();
int EnterFullSelection();
void GetUserRanges();
void GetUserSums();
void GetRangeAndSum();
long GetRange();
long SortRanges();
long GetSum();
long EnterHotNumbers();
long EnterColdNumbers();
long ApplyFilters();
void EnterPlayerNumbers();
long SortSums();
int CountLotteryNumbers();
//end of "Crap.h"
//Begin Declares, Variables used for Input/Output to Windows Controls
int LotteryBall[7], PlayersNumber[7];//Lottery Numbers & Player Numbers
long BSorted[50]; //Stores Numerically Sorted Draw numbers
int ASorted[50]; // Stores Ball Number prior to sorting INC Bonus
long BSorted2[50]; //Stores Numerically Sorted Draw numbers
int ASorted2[50]; // Stores Ball Number prior to sorting EXC Bonus
int TwoKeyNums[3]; // Stores the Users 2 Key Numbers (used in Enter2KeyNumbers)
int ThreeKeyNums[4]; // Stores the Users 3 Key Numbers (used in Enter3KeyNumbers)
long Spend; // amount Spent on the Lottery, Set to -1 because Lottery numbers are buffered - see below.
int FixedPlayerBall[7][351];//Stores lines of Player defined Fixed numbers (Used in EnterFixedPlayerNumbers et-al)
int FullSelection[7][9]; //Stores the 'Full Selection' on 49 Lottery numbers (Used in GetFullSelection)
int LotteryBallBuffer[7];// Used for buffering the Lottery numbers (you cannot play the lottery AFTER the current draw has been made!)
long LRange[50]; //Stores All Occurring Ranges (elements 6 to 48 used only)
long ASortedRange[50]; // Holds Numerically Sorted Ranges
long BSortedRange[50]; //Stores Range Positions prior to sorting (Position = diff of Highest and lowest ball nos) (Value = number of times has occurred)
long LSum [280]; // Stores All Occurring Sums (elements 21 - 279 used only)
long ASortedSum[280]; // Holds Numerically Sorted Sums
long BSortedSum[280]; //Stores Sum Positions prior to sorting (Position = diff of Highest and lowest ball nos) (Value = number of times has occurred)
long Stakes = 100; // Value of 1 Lottery Stake (currently
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -