Compare commits
4 Commits
8e14646806
...
fe84972374
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe84972374 | ||
|
|
ebfe70f0bb | ||
|
|
6e61b4d3d0 | ||
|
|
1d7defd069 |
39
index.html
@@ -70,14 +70,21 @@
|
||||
|
||||
.game {
|
||||
width: 600px;
|
||||
height: 600px;
|
||||
aspect-ratio: 1/1;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.game {
|
||||
width: 80%;
|
||||
aspect-ratio: 1/1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<img src="/static/logo.png" alt="">
|
||||
<img src="/static/logo.webp" alt="">
|
||||
</header>
|
||||
<div class="center">
|
||||
<div id="join-menu" class="join-menu"><input type="text" id="room-id" placeholder="Room ID"><button
|
||||
@@ -151,9 +158,6 @@
|
||||
i = mHouse[0];
|
||||
j = mHouse[1];
|
||||
if (ready && board) {
|
||||
console.log(turn);
|
||||
console.log(color);
|
||||
console.log(selected);
|
||||
if (board[j][i] !== "E" && (board[j][i] === board[j][i].toUpperCase() ? 0 : 1) === color && turn == color) {
|
||||
|
||||
selected = [i, j];
|
||||
@@ -178,7 +182,6 @@
|
||||
moves.forEach(move => {
|
||||
console.log(move);
|
||||
if (move[0] == i && move[1] == j) {
|
||||
console.log("YAY");
|
||||
fetch('{{ API_ROOT }}/move/' + ROOM_ID, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
@@ -349,19 +352,19 @@
|
||||
}
|
||||
|
||||
const assets = {
|
||||
p: '/static/black_pawn.png',
|
||||
r: '/static/black_rook.png',
|
||||
c: '/static/black_castle.png',
|
||||
b: '/static/black_bishop.png',
|
||||
k: '/static/black_king.png',
|
||||
q: '/static/black_queen.png',
|
||||
p: '/static/black_pawn.webp',
|
||||
r: '/static/black_rook.webp',
|
||||
c: '/static/black_castle.webp',
|
||||
b: '/static/black_bishop.webp',
|
||||
k: '/static/black_king.webp',
|
||||
q: '/static/black_queen.webp',
|
||||
|
||||
P: '/static/white_pawn.png',
|
||||
R: '/static/white_rook.png',
|
||||
C: '/static/white_castle.png',
|
||||
B: '/static/white_bishop.png',
|
||||
K: '/static/white_king.png',
|
||||
Q: '/static/white_queen.png',
|
||||
P: '/static/white_pawn.webp',
|
||||
R: '/static/white_rook.webp',
|
||||
C: '/static/white_castle.webp',
|
||||
B: '/static/white_bishop.webp',
|
||||
K: '/static/white_king.webp',
|
||||
Q: '/static/white_queen.webp',
|
||||
};
|
||||
|
||||
const loadPromises = Object.entries(assets).map(([key, src]) => {
|
||||
|
||||
BIN
static/black_bishop.webp
Normal file
|
After Width: | Height: | Size: 400 B |
BIN
static/black_castle.webp
Normal file
|
After Width: | Height: | Size: 324 B |
BIN
static/black_king.webp
Normal file
|
After Width: | Height: | Size: 608 B |
BIN
static/black_pawn.webp
Normal file
|
After Width: | Height: | Size: 364 B |
BIN
static/black_queen.webp
Normal file
|
After Width: | Height: | Size: 462 B |
BIN
static/black_rook.webp
Normal file
|
After Width: | Height: | Size: 444 B |
BIN
static/logo.webp
Normal file
|
After Width: | Height: | Size: 69 KiB |
BIN
static/white_bishop.webp
Normal file
|
After Width: | Height: | Size: 508 B |
BIN
static/white_castle.webp
Normal file
|
After Width: | Height: | Size: 424 B |
BIN
static/white_king.webp
Normal file
|
After Width: | Height: | Size: 684 B |
BIN
static/white_pawn.webp
Normal file
|
After Width: | Height: | Size: 602 B |
BIN
static/white_queen.webp
Normal file
|
After Width: | Height: | Size: 794 B |
BIN
static/white_rook.webp
Normal file
|
After Width: | Height: | Size: 554 B |