Exemple #1
0
 bool check_board(list_type const& list, std::size_t level)
 {
     for(std::size_t i = 0 ;i < level; ++i){
         if((list.at(i) == list.at(level))
             || (list.at(level) - list.at(i) == level - i)
             || (list.at(i) - list.at(level) == level - i))
             return false;
     }
     return true;
 }
Exemple #2
0
 void update_board(std::size_t pos, std::size_t val)
 {
     list_.at(pos) = val;
 }