use xiangting::{PlayerCount, calculate_necessary_tiles, calculate_unnecessary_tiles};
fn main() {
let hand: [u8; 34] = [
4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 3, 2, 0, 0, 0, 0, ];
let (rn_4p, nt_4p) = calculate_necessary_tiles(&hand, &PlayerCount::Four).unwrap();
let (_, ut_4p) = calculate_unnecessary_tiles(&hand, &PlayerCount::Four).unwrap();
assert_eq!(rn_4p, 2u8);
assert_eq!(nt_4p, 0b0000000_000000000_000000000_000000110); assert_eq!(ut_4p, 0b0000001_000000000_000000000_000000000);
let (rn_3p, nt_3p) = calculate_necessary_tiles(&hand, &PlayerCount::Three).unwrap();
let (_, ut_3p) = calculate_unnecessary_tiles(&hand, &PlayerCount::Three).unwrap();
assert_eq!(rn_3p, 3u8);
assert_eq!(nt_3p, 0b1111100_111111111_111111111_100000000); assert_eq!(ut_3p, 0b0000001_000000000_000000000_000000001); }