From cd13a21de8afaeb58dfe76d723ed8c7201edb5e0 Mon Sep 17 00:00:00 2001 From: skye Date: Fri, 28 Apr 2023 15:38:57 +0300 Subject: [PATCH] feat(client): init game status and parsing system --- client/src/game_status/mod.rs | 22 ++++++++++++++++++++++ client/src/game_status/parser.rs | 8 ++++++++ client/src/main.rs | 2 ++ 3 files changed, 32 insertions(+) create mode 100644 client/src/game_status/mod.rs create mode 100644 client/src/game_status/parser.rs diff --git a/client/src/game_status/mod.rs b/client/src/game_status/mod.rs new file mode 100644 index 0000000..173d97f --- /dev/null +++ b/client/src/game_status/mod.rs @@ -0,0 +1,22 @@ +/* + * This file is part of laurelin_client + * Copyright (C) 2023 Jonni Liljamo + * + * Licensed under GPL-3.0-only. + * See LICENSE for licensing information. + */ + +use crate::api::game::Action; + +mod parser; + +/// constructed from a vector of [`Action`]s +pub struct GameStatus { + +} + +impl GameStatus { + pub fn new(actions: Vec) -> Self { + Self { } + } +} diff --git a/client/src/game_status/parser.rs b/client/src/game_status/parser.rs new file mode 100644 index 0000000..c8ca561 --- /dev/null +++ b/client/src/game_status/parser.rs @@ -0,0 +1,8 @@ +/* + * This file is part of laurelin_client + * Copyright (C) 2023 Jonni Liljamo + * + * Licensed under GPL-3.0-only. + * See LICENSE for licensing information. + */ + diff --git a/client/src/main.rs b/client/src/main.rs index 3be201c..e6b6489 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -17,6 +17,8 @@ mod util; mod plugins; +mod game_status; + #[derive(Debug, Clone, PartialEq, Eq, Hash, Default, States)] enum AppState { #[default] -- 2.44.1