summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTyler Murphy <tylerm@tylerm.dev>2023-06-13 22:22:42 -0400
committerTyler Murphy <tylerm@tylerm.dev>2023-06-13 22:22:42 -0400
commit5de011115c92e49bb3900b7b18140d459db5f0b0 (patch)
tree3a812e44354f76043dd379bbf890d645a3e65d5e
parentmovement (diff)
downloadtuxman-5de011115c92e49bb3900b7b18140d459db5f0b0.tar.gz
tuxman-5de011115c92e49bb3900b7b18140d459db5f0b0.tar.bz2
tuxman-5de011115c92e49bb3900b7b18140d459db5f0b0.zip
pink go brr
-rw-r--r--client/js/input.js2
-rw-r--r--client/js/logic.js42
-rw-r--r--client/js/main.js2
-rw-r--r--client/static/cross.pngbin4289 -> 718 bytes
-rw-r--r--client/static/dot.pngbin4288 -> 699 bytes
-rw-r--r--client/static/tee.pngbin4283 -> 687 bytes
-rw-r--r--client/static/turn.pngbin569 -> 687 bytes
-rw-r--r--client/static/wall.pngbin571 -> 668 bytes
-rw-r--r--client/static/wall_end.pngbin4281 -> 658 bytes
9 files changed, 36 insertions, 10 deletions
diff --git a/client/js/input.js b/client/js/input.js
index 421ce2e..abe64bb 100644
--- a/client/js/input.js
+++ b/client/js/input.js
@@ -31,7 +31,7 @@ export function startInputListener() {
if (ev.code === "KeyB") {
debug_enabled = !debug_enabled
if (debug_enabled) {
- debug_style.innerHTML = "* {box-shadow: 0 0 1px red inset;}"
+ debug_style.innerHTML = "* {box-shadow: 0 0 3px red inset;}"
} else {
debug_style.innerHTML = ""
}
diff --git a/client/js/logic.js b/client/js/logic.js
index e9a0b05..405366c 100644
--- a/client/js/logic.js
+++ b/client/js/logic.js
@@ -147,16 +147,42 @@ const init_map = (data) => {
document.getElementById("lobby").style.display = "none"
- let width = 13
- let height = 5
+ // let width = 13
+ // let height = 5
+ // let m_data = [
+ // 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ // 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1,
+ //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,1,1,1,1,0,1,0,1,1,1,0,1,
+ 1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,
+ 1,0,1,0,1,1,1,1,1,0,1,0,1,1,1,1,1,0,1,0,1,
+ 1,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,1,
+ 1,0,1,1,1,0,1,1,1,0,1,0,1,1,1,0,1,1,1,0,1,
+ 1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,
+ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
]
-
+
data.map = new Map(width, height, m_data)
data.map.show()
}
diff --git a/client/js/main.js b/client/js/main.js
index 81262d3..1d241b7 100644
--- a/client/js/main.js
+++ b/client/js/main.js
@@ -71,7 +71,7 @@ function startGame(code, name) {
return false
}
- let players = Object.values(start_data.data.players).filter(p => { return p.name !== undefined })
+ let players = Object.values(start_data.data.players).filter(p => { return p !== null && p.name !== undefined })
if (players.length >= 4) {
alert('Room is full')
return false
diff --git a/client/static/cross.png b/client/static/cross.png
index 4ee9824..c8d1054 100644
--- a/client/static/cross.png
+++ b/client/static/cross.png
Binary files differ
diff --git a/client/static/dot.png b/client/static/dot.png
index 600e373..bab810b 100644
--- a/client/static/dot.png
+++ b/client/static/dot.png
Binary files differ
diff --git a/client/static/tee.png b/client/static/tee.png
index e3857fc..ca144be 100644
--- a/client/static/tee.png
+++ b/client/static/tee.png
Binary files differ
diff --git a/client/static/turn.png b/client/static/turn.png
index e6a93cf..c951f17 100644
--- a/client/static/turn.png
+++ b/client/static/turn.png
Binary files differ
diff --git a/client/static/wall.png b/client/static/wall.png
index f54d2fa..19d4168 100644
--- a/client/static/wall.png
+++ b/client/static/wall.png
Binary files differ
diff --git a/client/static/wall_end.png b/client/static/wall_end.png
index 7b28b61..4f09e19 100644
--- a/client/static/wall_end.png
+++ b/client/static/wall_end.png
Binary files differ