You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
544 B
34 lines
544 B
//! State information for a connected `Client`.
|
|
|
|
/// Play state for a conected `Client`.
|
|
#[derive(Clone, Debug, PartialEq)]
|
|
pub enum State {
|
|
/// Logging in
|
|
Login(Login),
|
|
|
|
/// Performing an action
|
|
Action,
|
|
|
|
/// Quitting the game
|
|
Quit,
|
|
}
|
|
|
|
/// Login state
|
|
#[derive(Clone, Debug, PartialEq)]
|
|
pub enum Login {
|
|
/// Username
|
|
Username,
|
|
|
|
/// Unknown user
|
|
CreateUser(String),
|
|
|
|
/// New user password
|
|
CreatePassword(String),
|
|
|
|
/// New user password again
|
|
CreatePassword2((String, String)),
|
|
|
|
/// Password for existing user
|
|
Password(String),
|
|
}
|