aboutsummaryrefslogtreecommitdiff
path: root/projects/11/K/K.txt
diff options
context:
space:
mode:
authorYuchen Pei <me@ypei.me>2018-01-20 15:41:49 +0100
committerYuchen Pei <me@ypei.me>2018-01-20 15:41:49 +0100
commitd3a0cc3a8ba6dfeb64d3faeffdeb6845b60e5840 (patch)
treed58df9ec2480e2a9ec6240f9c797f83d1a0b1056 /projects/11/K/K.txt
parent3571f998b28fbc8d9250ba04c983935f10a16c15 (diff)
rearranged the dir for github
- removed tools and pdfs - rearranged the projects dirs - added md files - other minor changes
Diffstat (limited to 'projects/11/K/K.txt')
-rw-r--r--projects/11/K/K.txt25
1 files changed, 0 insertions, 25 deletions
diff --git a/projects/11/K/K.txt b/projects/11/K/K.txt
deleted file mode 100644
index dc75c82..0000000
--- a/projects/11/K/K.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-from a to k
-
-- a title frame showing game name and instructions. space to continue.
-- a main frame showing the game running
-- a endofgame frame showing game results: win or lose
-
-- a Board class with cell being a 4 by 4 two-d array.
-- arrange strings according to an orientation: arrange(4 strings, dir)=cells
- - dir: 0: align to left, 1: align to right, 2: align to top, 3:align to bottom
- - e.g.: arrange({"abc", "bc", "dc", "efeh", 0}) gives the following board:
- abc_
- bc__
- dc__
- efeh
- - arrange({"abc", "bc", "dc", "efeh", 0}, 3) gives the following
- ___e
- a__f
- bbde
- ccch
-- a new tile of 'a' or 'b' appears each turn somewhere, using some quasirandomisation e.g. (23 * n^2 + 79) mod 16.
- - addtile(char, x, y)
-- the board transformation: board.trans(dir) = arrange(dir) . (fmap reduce) . getstring(dir). calls getstrings, then reduce on each row / column
-- board.getstrings(dir)= the strings according to direction dir. Inverse of arrange.
-- reduce(string)=string: reduce("baac")=="bbc"; reduce("aabb")=="bc"; and reduce("cbb")== "cc" instead of "d".
-- when one of the hjkl keys is pressed get the direction dir.