-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from linomp/feat/in-game-events
Feat/in game events
- Loading branch information
Showing
21 changed files
with
312 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,24 @@ | ||
# 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/ | ||
|
||
--- | ||
|
||
### 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) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<script lang="ts"> | ||
export let messages: Record<string, { type: string; content: string }>; | ||
</script> | ||
|
||
<div class="user-messages"> | ||
{#each Object.entries(messages) as [key, message]} | ||
<div class="message-card {message.type}"> | ||
<span>{message.content}</span> | ||
</div> | ||
{/each} | ||
</div> | ||
|
||
<style> | ||
.user-messages { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 1rem; | ||
align-items: center; | ||
width: 80%; | ||
} | ||
.message-card { | ||
border-radius: 8px; | ||
padding: 1em; | ||
width: 100%; | ||
text-align: center; | ||
border: 1px solid #ccc; | ||
transition: opacity 0.3s; | ||
font-size: smaller; | ||
} | ||
.message-card.WARNING { | ||
background-color: #ffffe0; | ||
color: #000000; | ||
} | ||
.message-card.INFO { | ||
background-color: rgba(129, 248, 94, 0.86); | ||
color: #000000; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
mvp/client/ui/vite.config.mjs.timestamp-1720871382103-708d65f7c40d4.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// vite.config.mjs | ||
import { defineConfig } from "file:///C:/Users/LM2P/Documents/000_programming/000-projects/pdm-game/mvp/client/ui/node_modules/vite/dist/node/index.js"; | ||
import { svelte } from "file:///C:/Users/LM2P/Documents/000_programming/000-projects/pdm-game/mvp/client/ui/node_modules/@sveltejs/vite-plugin-svelte/src/index.js"; | ||
import { run } from "file:///C:/Users/LM2P/Documents/000_programming/000-projects/pdm-game/mvp/client/ui/node_modules/vite-plugin-run/dist/index.mjs"; | ||
import * as path from "path"; | ||
var __vite_injected_original_dirname = "C:\\Users\\LM2P\\Documents\\000_programming\\000-projects\\pdm-game\\mvp\\client\\ui"; | ||
var isTest = process.env.NODE_ENV === "test"; | ||
var vite_config_default = defineConfig({ | ||
resolve: { | ||
alias: { | ||
src: path.resolve(__vite_injected_original_dirname, "./src") | ||
}, | ||
conditions: isTest ? ["browser"] : [] | ||
}, | ||
plugins: [ | ||
svelte({ hot: !process.env.VITEST }), | ||
run({ | ||
silent: !!process.env.VITEST, | ||
input: [ | ||
{ | ||
name: "typecheck", | ||
run: ["npm", "run", "check"], | ||
pattern: ["src/**/*.ts", "src/**/*.svelte"] | ||
} | ||
] | ||
}) | ||
], | ||
server: { | ||
port: isTest ? 8678 : 5173, | ||
proxy: isTest ? void 0 : { | ||
"/api": { | ||
target: "http://localhost:8000", | ||
changeOrigin: false | ||
} | ||
} | ||
}, | ||
build: { | ||
outDir: "build", | ||
target: "es2020", | ||
cssCodeSplit: false | ||
}, | ||
optimizeDeps: { | ||
include: isTest ? ["@testing-library/svelte", "chai"] : void 0 | ||
}, | ||
test: { | ||
globals: true, | ||
environment: "jsdom", | ||
setupFiles: "src/setup-tests.ts" | ||
} | ||
}); | ||
export { | ||
vite_config_default as default | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcubWpzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZGlybmFtZSA9IFwiQzpcXFxcVXNlcnNcXFxcTE0yUFxcXFxEb2N1bWVudHNcXFxcMDAwX3Byb2dyYW1taW5nXFxcXDAwMC1wcm9qZWN0c1xcXFxwZG0tZ2FtZVxcXFxtdnBcXFxcY2xpZW50XFxcXHVpXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ZpbGVuYW1lID0gXCJDOlxcXFxVc2Vyc1xcXFxMTTJQ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BQzFEO0FBQUEsRUFDQSxNQUFNO0FBQUEsSUFDSixTQUFTO0FBQUEsSUFDVCxhQUFhO0FBQUEsSUFDYixZQUFZO0FBQUEsRUFDZDtBQUNGLENBQUM7IiwKICAibmFtZXMiOiBbXQp9Cg== |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.