diff --git a/README.md b/README.md index f4dbf49..6c0e575 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,11 @@ # The Predictive Maintenance Game -![immagine](https://github.com/linomp/pdm-game/assets/40581019/fe7fbee0-bf31-487b-a727-f34472d94840) - +![immagine](./mvp/media/13_07_2024_trim.PNG) - **_Your mission_**: maximize profit & machine lifespan. - **_Your tools_**: data, intuition & nerve! - **_Your opponents_**: machine degradation & limited funds! - ### **_Will you accept the challenge?_** https://app.pdmgame.xmp.systems/ @@ -15,11 +13,12 @@ https://app.pdmgame.xmp.systems/ --- ### Dev roadmap + - [X] Basic UI - [X] Basic machine degradation model - [X] Sensor & prediction model purchase - [X] Live machine parameters visualization - [X] Leaderboard - [X] Basic RUL prediction model -- [ ] In-game events (e.g. production peak, score multipliers) +- [X] In-game events (e.g. production peak, score multipliers) diff --git a/mvp/client/ui/src/components/MachineData.svelte b/mvp/client/ui/src/components/MachineData.svelte index 6d262ff..e6b4476 100644 --- a/mvp/client/ui/src/components/MachineData.svelte +++ b/mvp/client/ui/src/components/MachineData.svelte @@ -6,10 +6,12 @@ gameOver, gameSession, globalSettings, + isOnNarrowScreen, predictionPurchaseButtonDisabled, sensorPurchaseButtonDisabled, } from "src/stores/stores"; import Sensor from "src/components/Sensor.svelte"; + import UserMessages from "src/components/UserMessages.svelte"; export let updateGameSession: (newGameSessionDto: GameSessionDTO) => void; @@ -73,6 +75,11 @@ {#if isNotUndefinedNorNull($gameSession)}
+ {#if $isOnNarrowScreen} + {#key 'narrow'} + + {/key} + {/if}
{#each Object.entries($gameSession?.machine_state?.operational_parameters ?? {}) as [parameter, value]}
- {"Remaining Useful Life"}: + {"Remaining Useful Life 🔮"}: {$gameSession?.machine_state?.predicted_rul ? `${$gameSession.machine_state?.predicted_rul} steps` : "???"} @@ -103,23 +110,22 @@
-
- {#each Object.entries($gameSession?.user_messages ?? {}) as [key, message]} -
- {message.content} -
- {/each} -
+ {#if !$isOnNarrowScreen} + {#key 'wide'} + + {/key} + {/if}
{/if} diff --git a/mvp/client/ui/src/components/SessionData.svelte b/mvp/client/ui/src/components/SessionData.svelte index a49a1a8..aa7825f 100644 --- a/mvp/client/ui/src/components/SessionData.svelte +++ b/mvp/client/ui/src/components/SessionData.svelte @@ -67,8 +67,13 @@ {#if isNotUndefinedNorNull($gameSession) && !$gameOver}

Current Step: {$gameSession?.current_step}

-

1}> - Available Funds: {formatNumber($gameSession?.available_funds)} +

+ Available Funds: + 1}>{formatNumber($gameSession?.available_funds)} +