1
// This file is part of hnefatafl-copenhagen.
2
//
3
// hnefatafl-copenhagen is free software: you can redistribute it and/or modify
4
// it under the terms of the GNU Affero General Public License as published by
5
// the Free Software Foundation, either version 3 of the License, or
6
// (at your option) any later version.
7
//
8
// hnefatafl-copenhagen is distributed in the hope that it will be useful,
9
// but WITHOUT ANY WARRANTY; without even the implied warranty of
10
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
// GNU Affero General Public License for more details.
12
//
13
// You should have received a copy of the GNU Affero General Public License
14
// along with this program.  If not, see <https://www.gnu.org/licenses/>.
15

            
16
#[derive(Clone, Debug)]
17
pub struct Characters {
18
    pub attacker: String,
19
    pub arrow_down: String,
20
    pub arrow_left: String,
21
    pub arrow_right: String,
22
    pub arrow_up: String,
23
    pub captured: String,
24
    pub dagger: String,
25
    pub defender: String,
26
    pub double_arrow_left: String,
27
    pub double_arrow_left_full: String,
28
    pub double_arrow_right: String,
29
    pub double_arrow_right_full: String,
30
    pub king: String,
31
    pub people: String,
32
    pub restricted_square: String,
33
    pub shield: String,
34
}
35

            
36
impl Default for Characters {
37
61674
    fn default() -> Self {
38
61674
        Self {
39
61674
            attacker: "♟".to_string(),
40
61674
            arrow_down: "↓".to_string(),
41
61674
            arrow_left: "←".to_string(),
42
61674
            arrow_right: "→".to_string(),
43
61674
            arrow_up: "↑".to_string(),
44
61674
            captured: "🗙".to_string(),
45
61674
            dagger: "🗡".to_string(),
46
61674
            defender: "♙".to_string(),
47
61674
            double_arrow_left: "⏪".to_string(),
48
61674
            double_arrow_left_full: "⏮".to_string(),
49
61674
            double_arrow_right: "⏩".to_string(),
50
61674
            double_arrow_right_full: "⏭".to_string(),
51
61674
            king: "♔".to_string(),
52
61674
            people: "👥".to_string(),
53
61674
            restricted_square: "⌘".to_string(),
54
61674
            shield: "⛨".to_string(),
55
61674
        }
56
61674
    }
57
}
58

            
59
impl Characters {
60
    pub fn ascii(&mut self) {
61
        self.attacker = "A".to_string();
62
        self.arrow_down = "v".to_string();
63
        self.arrow_left = "<".to_string();
64
        self.arrow_right = ">".to_string();
65
        self.arrow_up = "^".to_string();
66
        self.captured = "X".to_string();
67
        self.dagger = "A".to_string();
68
        self.defender = "D".to_string();
69
        self.double_arrow_left = "<".to_string();
70
        self.double_arrow_left_full = "<<".to_string();
71
        self.double_arrow_right = ">".to_string();
72
        self.double_arrow_right_full = ">>".to_string();
73
        self.king = "K".to_string();
74
        self.people = "OO".to_string();
75
        self.restricted_square = "#".to_string();
76
        self.shield = "D".to_string();
77
    }
78
}