void check_flags(int moves[], int flags[], int win_lose);
should be
void check_flags(int moves[], int flags[][7], int win_lose);