aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoop Kiefte <ikojba@gmail.com>2020-12-02 20:54:30 +0100
committerJoop Kiefte <ikojba@gmail.com>2020-12-02 20:54:30 +0100
commitb8d8cacf029e418dcce9ec0ef109787db86af0d8 (patch)
treef02edfc137230bad20b0932c06f95d07b2788cfb
parent82064ba7f308c412d3333fb087e54466add9add9 (diff)
Adding more keybindings
-rw-r--r--main.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/main.go b/main.go
index cd0471f..caf6d6b 100644
--- a/main.go
+++ b/main.go
@@ -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)