Adding results enum for the game.
This commit is contained in:
parent
e8b6170797
commit
d35a92ed23
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user