pink go brr
|
@ -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
|
||||
|
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 718 B |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 699 B |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 687 B |
Before Width: | Height: | Size: 569 B After Width: | Height: | Size: 687 B |
Before Width: | Height: | Size: 571 B After Width: | Height: | Size: 668 B |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 658 B |