From b8d8cacf029e418dcce9ec0ef109787db86af0d8 Mon Sep 17 00:00:00 2001 From: Joop Kiefte Date: Wed, 2 Dec 2020 20:54:30 +0100 Subject: Adding more keybindings --- main.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'main.go') 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) -- cgit v1.2.3-70-g09d2