Skip to content

Commit

Permalink
feat: add ROOM_USIZE constant
Browse files Browse the repository at this point in the history
  • Loading branch information
khoover committed Oct 9, 2024
1 parent 9902299 commit 9293f72
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/constants/extra.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,15 @@ pub const ROOM_VISUAL_PER_ROOM_SIZE_LIMIT: u32 = 500 * 1024;
/// [`Room`]: crate::objects::Room
pub const ROOM_SIZE: u8 = 50;

/// ['ROOM_SIZE'] cast into a `usize`, for indexing convenience.
///
/// ['ROOM_SIZE']: self::ROOM_SIZE
pub const ROOM_USIZE: usize = ROOM_SIZE as usize;

/// The number of total tiles in each [`Room`] in the game
///
/// [`Room`]: crate::objects::Room
pub const ROOM_AREA: usize = (ROOM_SIZE as usize) * (ROOM_SIZE as usize);
pub const ROOM_AREA: usize = ROOM_USIZE * ROOM_USIZE;

/// Owner username of hostile non-player structures and creeps which occupy
/// sector center rooms.
Expand Down

0 comments on commit 9293f72

Please sign in to comment.