From: Ian Jackson Date: Sat, 27 Jun 2020 01:01:53 +0000 (+0100) Subject: rename User -> Player X-Git-Tag: otter-0.2.0~1538 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=3e9f86b8d1395b1e898b1ef299b77473f0d292c9;p=otter.git rename User -> Player --- diff --git a/src/gamestate.rs b/src/gamestate.rs index 673d5d99..98ddebe0 100644 --- a/src/gamestate.rs +++ b/src/gamestate.rs @@ -61,7 +61,7 @@ pub struct PieceRecord { pub pos : Pos, pub p : Box, pub face : FaceId, - pub held : Option, + pub held : Option, } #[derive(Debug)] diff --git a/src/global.rs b/src/global.rs index f81f1b9b..c3bf3536 100644 --- a/src/global.rs +++ b/src/global.rs @@ -5,7 +5,7 @@ use crate::imports::*; use lazy_static::lazy_static; slotmap::new_key_type!{ - pub struct UserId; + pub struct PlayerId; pub struct ClientId; } @@ -18,21 +18,21 @@ impl Borrow for RawToken { pub struct Client { } -pub struct User { +pub struct Player { pub nick : String, pub clients : DenseSlotMap, } pub struct Instance { /* game state goes here */ - pub users : DenseSlotMap, + pub users : DenseSlotMap, pub gs : GameState, } #[derive(Clone)] pub struct InstanceAccessDetails { pub i : Arc>, - pub user : UserId, + pub user : PlayerId, } #[derive(Clone)] @@ -80,7 +80,7 @@ pub fn xxx_global_setup() { let i = Arc::new(Mutex::new(i)); let mut ig = i.lock().unwrap(); for (token, nick) in XXX_USERS_TOKENS { - let nu = User { + let nu = Player { nick : nick.to_string(), clients : Default::default(), };