3 play klondike and spider solitaire in your unicode terminal.
7 * TODO: DATA STRUCTURES FOR UNDO
8 CURRENT DS FOR STACK/WASTE ("move over") IS INCOMPATIBLE WITH UNDO!!!!
9 keeping taken card slots empty allows them to be reinserted by undo()
10 * TODO: extreme overlapping: if we are printing a sequence or multiple face
11 down cards, only print `.overlap` lines of the ends, and `1` line for the
13 * TODO: hjkl keyboard mode
14 * TODO: highlight `from` pile, so users can see at what input stage they are
15 * TODO: spider keyboard: `<from><to>` stacks; 1-9,0=tableu, return=draw
16 * TODO: use `#ifdef`s to differentiate games (sol, spider, ed-sol, ed-spider)
17 * TODO: patience: allow taking from 0(foundation)
18 * TODO: s/KLONDIKE/PATIENCE/g
19 * TODO: scores (see !w), variants: draw 3, max. n overturns
22 * TODO: ed(1) mode (solEDaire): playable on a line printer; ascii/ibm only?
28 {stock}[waste] [4*foundation]
31 [] (tableu piles) {} {}
39 - enum for each card (e.g. `SPADES_ACE`, `HEARTS_10`)
40 - each pile is an array holding (13 open cards + up to 6 closed)
41 [0] is the "northmost"/bottom-most card; unoccupied are NULL/NO_CARD
42 - a single card is represented in the 'cards' enum; if it is closed, it is negated.
43 - the foundation are 4 arrays of size 13
44 - the stock pile is an array holding n cards and an index to the one to display
45 when removing, decrement stack size and move all cards above index 1 over
46 - previous states array: where to move which cards to get back to the state before
48 double-linked list (follow `.prev` to undo, `.next` to redo)
49 "N cards were moved from X to Y" (do Y->X to undo)
50 allows jumping forwards in time as well (by repeating X->Y)
51 warn: when appending state, must check if `.next` was non-NULL and free rest of chain if so.
52 - multiple card sizes: schemes.h will store cards like below. if we want to draw a card
53 that has one or more other cards below it, we only draw the first `.overlap` lines,
54 otherwise if it is the last one, we draw the whole one.
55 this will give a look like in `~/solitaire-tests`
57 .grid=7, //vertical alignment
74 "closed": face down card