diff options
author | Joop Kiefte <ikojba@gmail.com> | 2020-12-02 20:54:30 +0100 |
---|---|---|
committer | Joop Kiefte <ikojba@gmail.com> | 2020-12-02 20:54:30 +0100 |
commit | b8d8cacf029e418dcce9ec0ef109787db86af0d8 (patch) | |
tree | f02edfc137230bad20b0932c06f95d07b2788cfb | |
parent | 82064ba7f308c412d3333fb087e54466add9add9 (diff) |
Adding more keybindings
-rw-r--r-- | main.go | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -116,9 +116,18 @@ func main() { ppos(22, 0, "...escape, escape!") return } - case 'x': + case 'w', 'i': // Up + rot = (p.Rot + 1) % 4 + case 's', 'k': // Down + y = p.Y + 1 + score += 1 + case 'd', 'l': // Right + x = p.X + 1 + case 'a', 'j': // Left + x = p.X - 1 + case 'x', '.': rot = (p.Rot + 1) % 4 - case 'z': + case 'z', ',': rot = (p.Rot + 3) % 4 case 'c': b, p = b.Swap(p) |