assets/codes/1010/game_array.cc
void Game1010::restart() {
    for (int i = 0; i < BOARD_SIZE; ++i) {
        state.board[i] = false;
    }
    state.tile = rand() % NUM_TILES; // generate random number between 0 and NUM_TILES-1
    
    // reset the score
    score = 0;
}
// restart the game: clear the board, assign a random tile, and reset the score
restart the game: clear the board, assign a random tile, and reset the score
restart the game : clear the board assign a random tile and reset the score
void Game1010::restart() {
    for (int i = 0; i < BOARD_SIZE; ++i) {
        state.board[i] = false;
    }
    state.tile = rand() % NUM_TILES; 
    score = 0;
}
void Game1010 :: restart ( ) { for ( int i = 0 ; i < BOARD_SIZE ; ++ i ) { state . board [ i ] = false ; } state . tile = rand ( ) % NUM_TILES ; score = 0 ; }
restart the game: clear the board, assign a random tile, and reset the score
restart the game : clear the board assign a random tile and reset the score
// generate random number between 0 and NUM_TILES-1 // reset the score