From e5101d5e3468e6c6ab84dd4dd9acf2fbd0928124 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Mon, 7 Jun 2021 12:21:59 +0200 Subject: [PATCH] Use wasd as control keys --- README | 2 +- main.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README b/README index a50c5f1..c54e819 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ My own toy implementation of 2048 on the command line. -It supports hjkl for movements and q for quit. +It supports wasd for movements and q for quit. diff --git a/main.c b/main.c index b72a531..913ff96 100644 --- a/main.c +++ b/main.c @@ -56,16 +56,16 @@ void game_loop(board *b) { printf("Make a move:\n"); fgets(c, sizeof(c), stdin); switch(c[0]) { - case 'h': + case 'a': d = west; break; - case 'j': + case 's': d = south; break; - case 'k': + case 'w': d = north; break; - case 'l': + case 'd': d = east; break; case 'q':