#include
#include
#include
using
namespace
std;
/*******************************************************************************
* ADT
*******************************************************************************/
struct
Element {
int
number;
bool
markFlag;
};
/*******************************************************************************
* Global variables
*******************************************************************************/
const
int
SQUARE_SIZE = 5;
const
int
MAX_SIZE = SQUARE_SIZE * SQUARE_SIZE;
/*******************************************************************************
* Function prototypes
*******************************************************************************/
void
generateRandomNumbers(int[]);
void
initializeBoard(Element[][SQUARE_SIZE]);
void
playBingo(const
int[], Element[][SQUARE_SIZE],
Element[][SQUARE_SIZE], Element[][SQUARE_SIZE]);
/*******************************************************************************
* Description:
* Starting point of the program. Creates the necessary arrays to play a
* 3-board match of Bingo. Seeds the random number generator. Initializes
* the random order for the drawn numbers and boards. Starts the game.
*
* Input(s):
* N/A
*
* Output:
* An integer that signals the exit code to the operating system (OS)
*******************************************************************************/
int
main() {
// variables
int
drawOrder[MAX_SIZE];
Element boardA[SQUARE_SIZE][SQUARE_SIZE],
boardB[SQUARE_SIZE][SQUARE_SIZE],
boardC[SQUARE_SIZE][SQUARE_SIZE];
// seed the RNG using the current system time
srand(time(0));
// initial steps
generateRandomNumbers(drawOrder);
initializeBoard(boardA);
initializeBoard(boardB);
initializeBoard(boardC);
// start the game!
playBingo(drawOrder, boardA, boardB, boardC);
// terminate
return
0;
}
void
generateRandomNumbers(int
generateNumber,
int
SIZE[]){
int
i= rand () % 0+25;
};