Skip to content

Commit

Permalink
more changes
Browse files Browse the repository at this point in the history
  • Loading branch information
LuckyTurtleDev committed May 16, 2023
1 parent 2422e57 commit 0cefeb1
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions models/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,36 @@ pub use cards::*;
// new structure
// event + game + keep alive message

#[derive(Debug, Clone, Decode, Encode)]
#[derive(Debug, Clone, Decode, Encode, PartialEq)]
pub enum Key {
Start
}

#[derive(Debug, Clone, Decode, Encode, PartialEq)]
pub enum ToPcProtocol {
ConnectionResponse
}

#[derive(Debug, Clone, Decode, Encode)]
pub enum ToPcGameEvent {}
#[derive(Debug, Clone, Decode, Encode, PartialEq)]
pub enum ToPcGameEvent {
KeyPressed(Key)
}

#[derive(Debug, Clone, Decode, Encode)]
#[derive(Debug, Clone, Decode, Encode, PartialEq)]
pub enum MessageToPc {
Protocol(ToPcProtocol),
GameEvent(ToPcGameEvent),
///pybadge is still connected and work
KeepAlive
}

#[derive(Debug, Clone, Decode, Encode)]
#[derive(Debug, Clone, Decode, Encode, PartialEq)]
pub enum ToPybadgeProtocol {
ConnectionRequest,
ConnectionConfirmation
}

#[derive(Debug, Clone, Decode, Encode)]
#[derive(Debug, Clone, Decode, Encode, PartialEq)]
pub enum ToPypadeGameEvent {
NewLevel(AvailableCards)
}
Expand Down

0 comments on commit 0cefeb1

Please sign in to comment.