Answer to Question #17084 in C++ for sahar

Question #17084
I want write Domino game with recursive function and now i have problem in this function and i am hopeful to help me,the follow code:
bool Domino(vector<vector<int> >matrix,int n){
bool value=false;
vector<vector<int> >result;
if(value == true){
print(result);
return true;
}
for(unsigned int i=0 ; i<matrix.size() ; i++){
for(unsigned int j=0 ; j<matrix[i].size() ; j=j+2){
if(check_is_valid(matrix,i,j,i,j+1,n)){
if(value == true){
Domino(matrix,n);
}
}
}
}
return false;
}
i get a boolean variable that set it to false and i want to set in to true when the domino is valid and now i don't know where i should change it to true or false !
thank for help
0
Expert's answer

Not answered

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

Ask Your question

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS