From 632aaff4b9f2f406455cc4bbc3dc01c423ae2c80 Mon Sep 17 00:00:00 2001 From: Max Bradbury Date: Wed, 24 Jun 2020 12:39:26 +0100 Subject: [PATCH] todo --- README.md | 4 +++- src/game.rs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c8f824b..4db68a0 100644 --- a/README.md +++ b/README.md @@ -37,9 +37,11 @@ some more practical uses would be things like: ## todo -* implement Result return types on ::from functions so we can handle errors +* implement Result return types on ::from functions so that we can handle errors * replace Image with Vec or something. seems like a pointless abstraction * replace game avatar with helper functions to get and set the sprite with an ID of A +* implement PartialEq for tiles etc. for the sake of checking for duplicate tiles? +* dedupe functions for tiles, sprites, etc. ### tidy up diff --git a/src/game.rs b/src/game.rs index 8254756..c8b8818 100644 --- a/src/game.rs +++ b/src/game.rs @@ -106,7 +106,7 @@ pub struct Game { #[derive(Debug)] pub struct GameHasNoAvatar; -// todo no tiles? no rooms? no palettes? +// todo no tiles? no rooms? no palettes? turn this into an enum? impl Game { #[inline] @@ -376,6 +376,8 @@ impl Game { self.items.iter().map(|item| item.id.clone()).collect() } + // todo dedupe? + /// first available tile ID. /// e.g. if current tile IDs are [0, 2, 3] the result will be `1` /// if current tile IDs are [0, 1, 2] the result will be `3`