pink go brr
This commit is contained in:
parent
edcdd665e1
commit
5de011115c
9 changed files with 36 additions and 10 deletions
|
@ -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 = ""
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
// 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1,
|
||||
// 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1,
|
||||
// 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1
|
||||
// ]
|
||||
|
||||
let width = 21
|
||||
let height = 21
|
||||
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,
|
||||
1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1,
|
||||
1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1,
|
||||
1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,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,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,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,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,
|
||||
1,0,1,1,1,0,1,0,1,1,1,1,1,0,1,0,1,1,1,0,1,
|
||||
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
||||
1,1,1,0,1,0,1,0,1,1,1,1,1,0,1,0,1,0,1,1,1,
|
||||
1,0,0,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,0,0,1,
|
||||
1,0,1,1,1,0,1,0,1,0,0,0,1,0,1,0,1,1,1,0,1,
|
||||
1,0,0,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,0,0,1,
|
||||
1,1,1,0,1,0,1,0,1,1,0,1,1,0,1,0,1,0,1,1,1,
|
||||
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
||||
1,0,1,1,1,0,1,0,1,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()
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Binary file not shown.
Before ![]() (image error) Size: 4.2 KiB After ![]() (image error) Size: 718 B ![]() ![]() |
Binary file not shown.
Before ![]() (image error) Size: 4.2 KiB After ![]() (image error) Size: 699 B ![]() ![]() |
Binary file not shown.
Before ![]() (image error) Size: 4.2 KiB After ![]() (image error) Size: 687 B ![]() ![]() |
Binary file not shown.
Before ![]() (image error) Size: 569 B After ![]() (image error) Size: 687 B ![]() ![]() |
Binary file not shown.
Before ![]() (image error) Size: 571 B After ![]() (image error) Size: 668 B ![]() ![]() |
Binary file not shown.
Before ![]() (image error) Size: 4.2 KiB After ![]() (image error) Size: 658 B ![]() ![]() |
Loading…
Reference in a new issue