-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbin.rs
29 lines (26 loc) · 939 Bytes
/
bin.rs
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
#![feature(slice_partition_dedup)]
extern crate poker;
fn main() {
let mut numbers = [2, 2, 2,];
let (dedup, _dup) = numbers.partition_dedup();
println!("dedup {:?} dup {:?}",dedup, _dup );
match _dup.len() {
0 => println!("no pair"),
1 => println!("one pair"),
2 => println!("three of a kind or two pairs, do an other match"),
3 => println!("four of a kind"),
_ => println!("not handled"),
// [first, second, third, fourth, fifth]
// if (first == second) && (second == third) && (third == first) =>
// {
// println!(
// "Brelan : {}, {}, {},{}, {}",
// first, second, third, fourth, fifth
// )
// }
// [first, second, third, fourth, fifth] => println!(
// "Default : {}, {}, {},{}, {}",
// first, second, third, fourth, fifth
// ),
}
}