1
0
Fork 0

Adding results enum for the game.

This commit is contained in:
Florent DENEF 2022-12-02 15:26:30 +01:00
parent e8b6170797
commit d35a92ed23
1 changed files with 7 additions and 1 deletions

View File

@ -1,10 +1,16 @@
#[repr(u8)]
#[derive(PartialEq, Eq)]
pub enum Play {
Rock,
Paper,
Scissors,
}
enum ResultPlay {
Win,
Draw,
Loss,
}
impl Into<char> for Play {
fn into(self) -> char {
match self {