aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2021-06-16 03:49:20 +0900
committernsfisis <nsfisis@gmail.com>2021-06-16 03:49:20 +0900
commit8c14e2c847ff806a64f0e40421e43f7d5ded480c (patch)
tree6cabf04d63e1dd28be2598878437c41bf084bcc6
parent9c0fcfdf0f81cd7fb682ffe568bab185bbc084ea (diff)
download2048.c-8c14e2c847ff806a64f0e40421e43f7d5ded480c.tar.gz
2048.c-8c14e2c847ff806a64f0e40421e43f7d5ded480c.tar.zst
2048.c-8c14e2c847ff806a64f0e40421e43f7d5ded480c.zip
add readme
-rw-r--r--README.md37
1 files changed, 37 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..f39db4d
--- /dev/null
+++ b/README.md
@@ -0,0 +1,37 @@
+# 2048
+
+CLI 2048 written in 2 KiB.
+
+
+## Compile
+
+```
+$ make build
+```
+
+By default, `2048_minified.c` is compiled. If you want to use another source file, set `SUFFIX` like this: `SUFFIX= make build` (it compiles `2048.c`)
+
+
+## Play
+
+Execute the binary like this:
+
+```
+$ ./bin/2048
+```
+
+You can specify a grid size between 2 and 8. The default size is 4x4.
+
+```
+$ ./bin/2048 8x8 # large 2048
+```
+
+
+## Source Files
+
+* `2048.c`
+ * Human-friendly version.
+* `2048_renamed.c`
+ * All variables, functions and macros are renamed. It can be read to some extent.
+* `2048_minified.c`
+ * Minified version. Its file size is 2 KiB.