fix rotation state names

This commit is contained in:
milo 2024-03-09 17:45:22 -05:00
parent f92c586cfc
commit 32d199933c
1 changed files with 1 additions and 2 deletions

View File

@ -20,8 +20,7 @@ async function handle(msg) {
case 'suggest': case 'suggest':
{ {
let [x, y, r, type] = suggest(msg.state.matrix, msg.state.hold, msg.state.next); let [x, y, r, type] = suggest(msg.state.matrix, msg.state.hold, msg.state.next);
console.log(x,y,r,type); r = ['spawn', 'right', 'reverse', 'left'][r];
r = ['north', 'right', 'south', 'west'][r];
type = 'IJLOSTZ'[type]; type = 'IJLOSTZ'[type];
return { x, y, r, type }; return { x, y, r, type };
} }