class game
{
int i,j;
public:
void initialise(char board[][SIDE], int moves[]);
void game::initialise(char board[][SIDE],int moves[])
{
int i,j;
// Initiate the random number generator so that
// the same configuration doesn't arises
// Initially the board is empty
for ( i=0; i<SIDE; i++)
{
for ( j=0; j<SIDE; j++)
board[i][j] = ' ';
}
// Fill the moves with numbers
for ( i=0; i<SIDE*SIDE; i++)
moves[i] = i;
// randomise the moves
rand(moves, moves + SIDE*SIDE);
return;
}
jeudi 9 avril 2020
too many aurguments in rand function in void initialise
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire