/// <summary> /// validate the list /// </summary> /// <param name="valid_list"></param> /// <returns></returns> public bool valid(List <List <string> > valid_list) { bool flag = true; ValidCom vc = new ValidCom(valid_list, rows, cols); if (level == easy.Level) { ValidEasy ve = new ValidEasy(valid_list); if (ve.valid_easy == false || vc.valid_common == false) { flag = false; } } if (level == medium.Level) { ValidMed vm = new ValidMed(valid_list); if (vm.valid_med == false || vc.valid_common == false) { flag = false; } } if (level == hard.Level) { if (vc.valid_common == false) { flag = false; } } return(flag); }
/// <summary> /// validate whether the new list will cover old list /// </summary> /// <param name="valid_list"></param> /// <param name="word_list"></param> /// <returns></returns> public bool valid_cover(List <List <string> > valid_list, List <string> word_list) { bool flag = true; ValidCom vc = new ValidCom(valid_list, rows, cols, word_list); if (vc.valid_cover == false) { flag = false; } return(flag); }