Skip to content

Commit

Permalink
oops my mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
HanseoSong committed Jan 10, 2024
1 parent cb1d927 commit 236fce4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
2 changes: 0 additions & 2 deletions game.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ function kick(block, direction) {
}
else kicktable = kickSZLJT[r];

console.log(r, kicktable);

for(let i=0; i<5; i++) {
block.x+=kicktable[i]["dx"]*(direction=="cw"?1:-1);
block.y-=kicktable[i]["dy"]*(direction=="cw"?1:-1);
Expand Down
32 changes: 16 additions & 16 deletions kicktable.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,32 +30,32 @@ const kickSZLJT = [
]

const kickI = [
[
{dx: 0, dy: 0},
{dx: -1, dy: 0},
{dx: -1, dy: 1},
{dx: 0, dy: -2},
{dx: -1, dy: -2}
],
[
{dx: 0, dy: 0},
{dx: 1, dy: 0},
{dx: 1, dy: -1},
{dx: 0, dy: 2},
{dx: -2, dy: 0},
{dx: -2, dy: -1},
{dx: 1, dy: 2}
],
[
{dx: 0, dy: 0},
{dx: 1, dy: 0},
{dx: 1, dy: 1},
{dx: 0, dy: -2},
{dx: 1, dy: -2}
{dx: -1, dy: 0},
{dx: 2, dy: 0},
{dx: -1, dy: 2},
{dx: 2, dy: -1}
],
[
{dx: 0, dy: 0},
{dx: 2, dy: 0},
{dx: -1, dy: 0},
{dx: -1, dy: -1},
{dx: 0, dy: 2},
{dx: -1, dy: 2}
{dx: 2, dy: 1},
{dx: -1, dy: -2}
],
[
{dx: 0, dy: 0},
{dx: 1, dy: 0},
{dx: -2, dy: 0},
{dx: 1, dy: -2},
{dx: -2, dy: 1}
]
]

0 comments on commit 236fce4

Please sign in to comment.