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
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
extern crate rand;

use rand::random;

macro_rules! choose {
    ( $x:expr ) => {
        {
            let length = $x.len() as f32;
            let idx = rand::random::<f32>() * length;
            $x[idx.floor() as usize]
        }
    };
}

pub fn angry() -> String {
    let faces = [
      "(╯°□°)╯︵ ┻━┻",
      "┻━┻︵ \\(°□°)/ ︵ ┻━┻",
      "(ಠ_ಠ)",
      "(⌐■_■)",
      "ヾ(⌐■_■)ノ",
      "ヽ(`Д´)ノ",
      "ರ_ರ",
      "(ノಠ益ಠ)ノ",
      "ノಠ益ಠ)ノ彡",
      "( ͠° ͟ʖ ͡°)",
      "ᕦ(ò_óˇ)ᕤ",
      "(╯°□°)╯︵(\\ .o.)\\",
      "(ง ͠° ͟ل͜ ͡°)ง",
      "(ง ͡ʘ ͜ʖ ͡ʘ)ง",
      "(ง •̀_•́)ง",
      "┌( ಠ_ಠ)┘",
      "╚(ಠ_ಠ)=┐",
      "(۶ૈ ۜ ᵒ̌▱๋ᵒ̌ )۶ૈ=͟͟͞͞ ⌨",
      "꒰✘Д✘◍꒱",
      "( `·´ )",

    ];

    choose!(faces).to_string()
}

pub fn confused() -> String {
    let faces = [
        "( '-')",
        "⊙﹏⊙",
        "ლ,ᔑ•ﺪ͟͠•ᔐ.ლ",
        "⚆ _ ⚆",
        "ノ( º _ ºノ)",
        "٩◔̯◔۶",
        "ʅʕ•ᴥ•ʔʃ",
    ];

    choose!(faces).to_string()
}


pub fn disappointed() -> String {
    let faces = [
        "¬_¬",
        "( ︶︿︶)",
        "(;一_一)",
    ];
    choose!(faces).to_string()
}

pub fn excited() -> String {
    let faces = [
        "☜(⌒▽⌒)☞",
        "ヽ༼ຈل͜ຈ༽ノ",
        "ᕕ( ᐛ )ᕗ",
        "ᕙ༼ຈل͜ຈ༽ᕗ",
        "ᕙ༼ ,,ԾܫԾ,, ༽ᕗ",
        "\\m/_(>_<)_\\m/",
        "/(^.^/)",
        "(ノ◕ヮ◕)ノ",
        "t(-.-t)",
        "ヽ༼ʘ̚ل͜ʘ̚༽ノ",
        "ヽ༼ຈل͜ຈ༽ง",
        "ヽ༼ຈل͜ຈ༽ノ",
        "ヽ༼Ὸل͜ຈ༽ノ",
        "ヾ(⌐■_■)ノ",
    ];

    choose!(faces).to_string()
}

pub fn happy() -> String {
    let faces = [
      "( ͜。 ͡ʖ ͜。)",
      "~(‾▿‾)~",
      "( ͡° ͜ʖ ͡°)",
      "(\\_/)",
      "╚(▲_▲)╝",
      "(‾⌣‾)♉",
      "(˚◡˚)",
      "( ゚ヮ゚)",
      "٩(❛ᴗ❛)۶",
      "(。◕ ‿ ◕。)",
      "(ʘ‿ʘ)",
      "(ಠ‿ಠ)",
      "(ಠ⌣ಠ)",
      "(ღ˘⌣˘ღ)",
      "(ღ˘⌣˘ღ)",
      "(ᵔᴥᵔ)",
      "(•ω•)",
      "(•◡•)/",
      "=^.^=",
      "☼.☼",
      "♥‿♥",
      "ʘ‿ʘ",
      "° ͜ʖ ͡°",
    ];

    choose!(faces).to_string()
}

pub fn meh() -> String {
    let faces = [
        "¯\\_(ツ)_/¯",
        "( ͡° ͜ʖ ͡°)",
        "(-.-)",
    ];

    choose!(faces).to_string()
}

pub fn sad() -> String {
    let faces = [
        "(¡~¡)",
        "( ⚆ _ ⚆ )",
        "༼;´༎ຶ ۝ ༎ຶ༽",
        "༼ ºل͟º ༽",
        "ಠ╭╮ಠ",
        ":("
    ];

    choose!(faces).to_string()
}

pub fn deal_with_it() -> String {
    "(⌐■_■)".to_string()
}

// TODO: figure out how to build a
// collection of functions

// pub fn face() -> String {
//     let fns = vec![
//         happy,
//         sad
//     ];
//
//     choose!(fns)()
// }

#[test]
fn test_angry() {
    let face = angry();
    println!("{}", face);
    assert_eq!(face, "(╯°□°)╯︵ ┻━┻".to_string());
}