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
use bitflags::bitflags;
bitflags! {
/// Bitflags indicating which human techniques are active/enabled.
///
/// The flags are organized into bytes for better organization:
/// - Easy techniques from bits 0-7
/// - Medium techniques from bits 8-15
/// - Hard techniques from bits 16-23
/// - Expert techniques from bits 24-31
///
/// Composite groups (EASY, MEDIUM, HARD, EXPERT) are here for convenience.
#[repr(transparent)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct TechniqueFlags: u32 {
/// Apply the naked singles technique.
const NAKED_SINGLES = 1 << 0;
/// Apply the hidden singles technique.
const HIDDEN_SINGLES = 1 << 1;
/// Apply the naked pairs technique.
const NAKED_PAIRS = 1 << 8;
/// Apply the hidden pairs technique.
const HIDDEN_PAIRS = 1 << 9;
/// Apply the locked candidates technique.
const LOCKED_CANDIDATES = 1 << 10;
/// Apply the naked triples technique.
const NAKED_TRIPLES = 1 << 11;
/// Apply the hidden triples technique.
const HIDDEN_TRIPLES = 1 << 12;
/// Apply the X-Wing technique.
const X_WING = 1 << 16;
/// Apply the naked quads technique.
const NAKED_QUADS = 1 << 17;
/// Apply the hidden quads technique.
const HIDDEN_QUADS = 1 << 18;
/// Apply the Swordfish technique.
const SWORDFISH = 1 << 19;
/// Apply the Jellyfish technique.
const JELLYFISH = 1 << 20;
/// Apply the Skyscraper technique.
const SKYSCRAPER = 1 << 21;
/// Apply the W-Wing technique.
const W_WING = 1 << 24;
/// Apply the XY-Wing technique.
const XY_WING = 1 << 25;
/// Apply the XYZ-Wing technique.
const XYZ_WING = 1 << 26;
/// Alias for X_WING.
#[deprecated(note = "use X_WING instead")]
const XWING = Self::X_WING.bits();
/// Apply easy techniques
const EASY = 0x0000_00FF;
/// Apply medium techniques
const MEDIUM = 0x0000_FF00;
/// Apply hard techniques
const HARD = 0x00FF_0000;
/// Apply expert techniques
const EXPERT = 0xFF00_0000;
}
}