Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 0x
- 1010111 57 87 W
- 1010011 53 83 S
- 1000001 41 65 A
- 1000100 44 68 D
- 6543210
- 0100110 26 38 up
- 0101000 28 40 down
- 0100101 25 37 left
- 0100111 27 39 right
- 6 5 4 3 2 1 0
- 64 32 16 8 4 2 1
- onkeydown=e=>K=e.which
- K&64 ? P1 : P2
- P1:
- K&2?K&4?up=P1-=n:down=P1+=n:K&1?left=--P1:right=++P1
- P2:
- K&8?down=P2+=n:K&3?right=++P2:K&1?left=--P2:up=P2-=n
Add Comment
Please, Sign In to add comment