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.
33 lines
915 B
33 lines
915 B
use valence::{
|
|
prelude::{Client, GameMode},
|
|
text::{Color, TextFormat},
|
|
};
|
|
|
|
use crate::{game_state::GameState, CurrentGameState};
|
|
|
|
use super::Command;
|
|
|
|
pub fn advance_game_state(game_state: &mut CurrentGameState) {
|
|
match game_state.0 {
|
|
GameState::EarlyGame => {
|
|
game_state.0 = GameState::MidGame;
|
|
game_state.1 += 1;
|
|
}
|
|
GameState::MidGame => {
|
|
game_state.0 = GameState::LateGame;
|
|
game_state.1 += 1;
|
|
}
|
|
GameState::LateGame => {
|
|
game_state.1 += 1;
|
|
}
|
|
}
|
|
}
|
|
|
|
pub fn game_state(client: &mut Client, game_state: &CurrentGameState) {
|
|
client.send_message(match game_state.0 {
|
|
GameState::EarlyGame => "Early game".italic().color(Color::GRAY),
|
|
GameState::MidGame => "Mid game".italic().color(Color::GRAY),
|
|
GameState::LateGame => "Late game".italic().color(Color::GRAY),
|
|
})
|
|
}
|