Commit Graph

58 Commits

Author SHA1 Message Date
M1n-0
11d47caf1e fix merge 2026-03-31 13:56:58 +02:00
M1n-0
40fe732caa fix merge branch 2026-03-31 13:52:42 +02:00
Sysy's
36fa5a9092 Support per-level game element configs
Convert global config maps (initialMirrorAngles, buttonGroups, doorGroups, captorGroups, rotatorButtons) into per-level arrays and add getCurrentLevelConfig(levelConfigs) helper. Update getButtonGroup, getDoorGroup, getCaptorGroup, getRotatorButtonConfig, isMirrorControlledByButton, syncRotatorButtons and initializeMirrorOrientations to pull configs for the current level. Also tweak a couple of level tiles and add a rotator button config for the third level ("3,7": { mirrorX: 7, mirrorY: 7, step: -22.5, intervalMs: 1000 }) while keeping empty objects for levels without overrides. These changes enable per-level customization of mirrors, buttons, doors, captors and rotators.
2026-03-31 13:39:58 +02:00
Sysy's
f9e94f5c18 Implement captors and color-dependent laser effects
Add captor support and related door-toggling state plus color-specific laser interactions. Changes include: replace one level tile value (15 -> 20), add captorGroups/getCaptorGroup, add toggleDoorsFromCaptor, and new state (toggledDoors, poweredCaptors). traceLaser now initializes openedDoors from toggledDoors, tracks nextPoweredCaptors, handles captor tiles (red lasers power/toggle door groups, yellow passes, others stop), updates poweredCaptors, and applies color-based behavior for rotator buttons and demi-wall reflections (only reflect for blue). Reset toggledDoors and poweredCaptors on next level. These changes implement captor mechanics that toggle door groups and ensure correct color-dependent laser effects.
2026-03-31 13:39:58 +02:00
Sysy's
1ad8282833 Remove rotatorButton on lvl 1 2026-03-31 13:39:58 +02:00
4b8a650c26 Level 3 2026-03-31 13:39:52 +02:00
Sysy's
94a60de6b2 Add rotator buttons and auto-rotating mirrors
Introduce a new rotator button tile and mirror auto-rotation feature. CSS adds styles for rotator buttons and locked mirror display. JS: add legend entry and rotatorButtons config, track activeRotatorButtons and rotatorIntervals, implement rotateMirrorStep, isMirrorControlledByButton, syncRotatorButtons and stopAllRotatorButtons; wire rotator behavior into traceLaser and loadGrid so rotator buttons activate intervals that rotate target mirrors automatically and lock out manual rotation. Refactor rotateMirror to reuse rotation step logic and ensure rotator intervals are cleared when advancing levels.
2026-03-31 13:38:24 +02:00
663e89de9e Level 2 2026-03-31 13:38:24 +02:00
0ccd551ef8 Level 2 2026-03-31 13:38:24 +02:00
7131b876cc Level 2 2026-03-31 13:38:24 +02:00
Sysy's
8517ac89da Add win overlay 2026-03-31 13:38:24 +02:00
Sysy's
be14f4513c Add game title and update layout styles
Adjust UI visuals: change page background to #FFF6E5, increase main container border-radius from 10px to 150px, and soften toolbox corners (5px → 15px). Add a new .game-title CSS rule (responsive font-size, weight, color, letter-spacing, centered) and insert an <h1 class="game-title">Mirror Game</h1> into the game template. These are visual polish changes only; no gameplay logic was modified.
2026-03-31 13:38:24 +02:00
Sysy's
0c2d989ad8 Make size bigger + add ads 2026-03-31 13:38:24 +02:00
Sysy's
1c59e7af7a Fix textures/button/lasers & add ads 2026-03-31 13:38:24 +02:00
63c4244e92 Resolution merge conflicts 2026-03-31 13:38:24 +02:00
4d1ed00f03 Map modified + sprites 2026-03-31 13:38:24 +02:00
Sysy's
40a8dee263 Add diagonal lasers 2026-03-31 13:38:24 +02:00
Sysy's
d8f56cb548 Remove player + right click change rotation mirror 2026-03-31 13:38:24 +02:00
Sysy's
853a6ae9ee Make mirror rotate on click 2026-03-31 13:38:24 +02:00
Sysy's
6d81f67ddf Track laser segments and update UI theme
Add per-cell laserSegments tracking and use it to render correct laser orientation: introduce laserSegments global, reset it at trace start, populate entries when tracing, and consult it in loadGrid to choose horizontal vs vertical classes. Update UI styling from a dark to a lighter theme (body and main backgrounds, cell/empty/mirror/wall colors and laser gradients), remove some borders/fit-content sizing, and add a "map" class to the map container in the HTML. These changes fix laser orientation rendering and refresh the game's visual theme.
2026-03-31 13:38:24 +02:00
2c03331663 Upgrade of design of light of laser + add posibility to move a cursor and rotate mirror with keyboard 2026-03-31 13:38:03 +02:00
3e6a2130e9 Laser print and reflect 2026-03-31 13:38:02 +02:00
2eb7bd46dc First version of button for mirrors 2026-03-31 13:38:02 +02:00
a9c4c653d2 Grid enlargement 2026-03-31 13:38:02 +02:00
e787094078 Rebase of feature/mirror + merge with the grid program 2026-03-31 13:38:02 +02:00
Sysy's
1ade298ff5 Add rotateMirror to rotate element 45°
Add a small utility function in web/assets/js/index.js that increments an element's CSS rotation by 45 degrees. The function reads the element's inline transform (handling an empty value), parses the current rotation angle modulo 360, and sets the new rotate(angle+45) value.
2026-03-31 13:38:02 +02:00
d5a84144ef Change index.js and index.css to game.js and game.css 2026-03-31 13:38:02 +02:00
1276edf2f2 End of grid 2026-03-31 13:38:02 +02:00
90e2064ec9 First version of laser 2026-03-31 13:38:02 +02:00
34b76b2cb9 Print grid on html + minimalist css (which will not be used) 2026-03-31 13:38:02 +02:00
M1n-0
15b585df02 testfile 2026-03-31 13:29:29 +02:00
M1n-0
f6347feff1 testfile 2026-03-31 13:29:29 +02:00
GreyRav
c7f0e747b1 fix : change port 2026-03-31 13:29:29 +02:00
GreyRav
1d28a75529 fix : html + css display 2026-03-31 13:29:29 +02:00
Sysy's
ecbf7a5b34 Add hero page HTML and responsive CSS
Add a new landing view and stylesheet for MirrorGame. Creates web/templates/view/index.html (hero layout with image, play button, and left/right ad banner iframes) and web/assets/css/index.css (CSS variables, Inter font import, hero layout, responsive breakpoints, and .hero-play-button styles). Provides responsive behavior and positioning for ads and hero components.
2026-03-31 13:29:29 +02:00
GreyRav
46660bd921 fix : path to index.html 2026-03-31 13:29:29 +02:00
ee415c3d8b add check command and user object in user.rs file 2026-03-31 11:40:03 +02:00
e77fb7cb1e Merge branch 'main' of https://git.ninolbt.com/Nono/Projet_48h 2026-03-31 09:22:55 +02:00
4c1a439319 update and add insert command in user.rs file 2026-03-31 09:22:43 +02:00
999d27936a Update README 2026-03-31 09:19:26 +02:00
b509c9f4c3 sql rust interaction file update 2026-03-30 17:01:50 +02:00
26cdc99701 add sql rust interaction file 2026-03-30 15:48:14 +02:00
Sysy's
9b1e2ccf6d Use root-relative path for index.css
Update stylesheet link in view template from '../../assets/css/index.css' to '/assets/css/index.css' so the CSS resolves from the site root. This prevents broken styling when the page is accessed from nested routes or different template contexts.
2026-03-30 15:20:49 +02:00
Sysy's
68421a71df Add hero page HTML and responsive CSS
Add a new landing view and stylesheet for MirrorGame. Creates web/templates/view/index.html (hero layout with image, play button, and left/right ad banner iframes) and web/assets/css/index.css (CSS variables, Inter font import, hero layout, responsive breakpoints, and .hero-play-button styles). Provides responsive behavior and positioning for ads and hero components.
2026-03-30 15:09:09 +02:00
554d44cebb Merge branch 'backend-axum' of https://git.ninolbt.com/Nono/Projet_48h 2026-03-30 12:14:20 +02:00
GreyRav
3ad5811566 add : all folder + files for backend project 2026-03-30 11:42:42 +02:00
GreyRav
a8a0f54cb7 add : gitignore for target forlder 2026-03-30 11:27:04 +02:00
e3747fd5a4 update read.me 2026-03-30 11:02:30 +02:00
7b0cd8c728 Merge branch 'main' of https://git.ninolbt.com/Nono/Projet_48h 2026-03-30 10:46:29 +02:00
dc064dd8f3 add object file 2026-03-30 10:46:09 +02:00