laneya2

cave exploration game
git clone https://git.ce9e.org/laneya2.git

commit
e29a5847e0c84fff2cdfe94b0ad0b9a923700f1e
parent
0574812fb1feeffe28f527332833eb2eea539a48
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2024-09-21 08:18
define colors

Diffstat

M static/main.js 2 +-
M static/style.css 30 +++++++++++++++++++++++++++---

2 files changed, 28 insertions, 4 deletions


diff --git a/static/main.js b/static/main.js

@@ -19,7 +19,7 @@ var game = {
   19    19             return ['>', -1];
   20    20         }
   21    21         if (Object.values(this.objects).some(obj => x === obj.pos.x && y === obj.pos.y)) {
   22    -1             return ['@', 1];
   -1    22             return ['@', 4];
   23    23         }
   24    24         if (this.rects.some(rect => x >= rect.x1 && x <= rect.x2 && y >= rect.y1 && y <= rect.y2)) {
   25    25             return ['.', -1];

diff --git a/static/style.css b/static/style.css

@@ -1,4 +1,28 @@
    1    -1 .color-1 {
    2    -1 	font-weight: bold;
    3    -1 	color: blue;
   -1     1 :root {
   -1     2 	background: #fff;
   -1     3 	color: #000;
   -1     4 }
   -1     5 .color-0 { color: #ccc }
   -1     6 .color-1 { color: #c00 }
   -1     7 .color-2 { color: #591 }
   -1     8 .color-3 { color: #b71 }
   -1     9 .color-4 { color: #16c }
   -1    10 .color-5 { color: #96a }
   -1    11 .color-6 { color: #299 }
   -1    12 .color-7 { color: #333 }
   -1    13 
   -1    14 @media (prefers-color-scheme: dark) {
   -1    15 	:root {
   -1    16 		color-scheme: dark;
   -1    17 		background: #000;
   -1    18 		color: #fff;
   -1    19 	}
   -1    20 	.color-0 { color: #333 }
   -1    21 	.color-1 { color: #f33 }
   -1    22 	.color-2 { color: #7c0 }
   -1    23 	.color-3 { color: #ed0 }
   -1    24 	.color-4 { color: #6ad }
   -1    25 	.color-5 { color: #c8b }
   -1    26 	.color-6 { color: #0dd }
   -1    27 	.color-7 { color: #ccc }
    4    28 }