-
Notifications
You must be signed in to change notification settings - Fork 0
/
solver.h
77 lines (70 loc) · 1.92 KB
/
solver.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#ifndef SOLVER_H
#define SOLVER_H
#include <ostream>
#include <istream>
#include "celle.h"
#include "costanti.h"
#include "scacchiera.h"
#include "strategiadata.h"
/**
* Classe Solver
*/
class Solver: public Scacchiera
{
public:
Solver(): Scacchiera() {};
Solver(int init[X][Y]) : Scacchiera(init) {};
Solver(const char init[]) : Scacchiera(init) {};
inline int valore(int x, int y) {return Scacchiera::valore(x,y);};
void valore(int x, int y, int n);
// strategie
bool controlla();
//elimina
bool lineameno(int y, int n);
bool colonnameno(int x, int n);
bool quadratomeno(int z, int n);
bool quadratomeno(int zx, int zy, int n);
bool eliminalinea(int y);
bool eliminacolonna(int x);
bool eliminaquadrato(int zx, int zy);
bool eliminaquadrato(int z);
bool elimina();
//singles
bool singles();
bool colonnaunico(int x,int n);
bool lineaunico(int y, int n);
bool quadratounico(int z, int n);
bool singlescolonna(int x);
bool singleslinea(int y);
bool singlesquadrato(int z);
// naked pair
bool nackedpairlinea(int y);
bool nackedpaircolonna(int x);
bool nackedpairquadrato(int z);
bool nackedpair();
// hiddern pair
bool hiddenpairlinea(int y);
bool hiddenpaircolonna(int x);
bool hiddenpairquadrato(int z);
bool hiddenpair();
//pointing pair
bool pointingpairquadrato(int z);
bool pointingpair();
//boxreduction
bool boxreductionlinea(int y);
bool boxreductioncolonna(int x);
bool boxreduction();
//xwing
bool xwing();
//simplecolouring
bool nextcatenapairone(int x, int y, int x0, int y0, int n, int step, Scacchiera& used);
bool simplecolouring();
bool risolvilogica();
bool risolvilogicadebug();
bool risolvi();
int risolvidifficolta();
Strategie risolvistrategie();
Strategie strategie();
int difficolta();
};
#endif //SOLVER_H