diff --git a/game.js b/game.js index cb38b85..a423202 100644 --- a/game.js +++ b/game.js @@ -1,6 +1,9 @@ function initGame(game, state) { state.info = {}; state.info.time = 60 * 60 * 9; + + state.player.stats = {}; + state.player.stats.health = 100; } // TODO: format string this lol @@ -24,3 +27,9 @@ function updateWorldInfo(state) { timeInfo.textContent = "Time: " + renderTime(state.info.time); } + +function updatePlayerInfo(state) { + const health = document.querySelector("#player-info-health"); + + health.textContent = "Health: " + state.player.stats.health; +} diff --git a/satiate.css b/satiate.css index 0e46e30..a912d38 100644 --- a/satiate.css +++ b/satiate.css @@ -42,12 +42,17 @@ html, body { flex: 5; } -#self-info { +#player-info { margin: 10px; background: #222; flex: 5; } +.info-header { + font-size: 36px; + text-align: center; +} + #control-area { display: flex; min-height: 40%; diff --git a/satiate.html b/satiate.html index 5e3697f..c0842bf 100644 --- a/satiate.html +++ b/satiate.html @@ -25,15 +25,15 @@ this is the menu, eventually
- this is world info +
World
Time to get a watch!
-
- this is your own info +
+
Player
+
- this is the log