]>
git.gir.st - solVItaire.git/log
summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
girst [Sat, 19 Jan 2019 16:37:02 +0000 (17:37 +0100)]
fix foundation rendering (SPIDER)
by using a static int to store the foundation index, it couldn't be
reset when a new game was started. this caused the first pile to be e.g.
to end up on the second foundation if the game before had 1 completed.
girst [Fri, 11 Jan 2019 20:29:48 +0000 (21:29 +0100)]
fix bold hack; extreme overlap: always show top selected card
girst [Thu, 10 Jan 2019 14:16:31 +0000 (15:16 +0100)]
fix broken halfcard rendering
due to the faint hack, black cards were 1 byte shorter than red cards.
this meant, that the offset for halfcard was off for red colors (as it
has been adjusted for black cards), which caused printing errors in
spider's foundation for overlapping red cards. can't pad with zero bytes
(as that would end the string), but using an extra escape seems to be OK
for xterm and vte-based terminals.
girst [Tue, 8 Jan 2019 19:30:06 +0000 (20:30 +0100)]
update TODOs
girst [Tue, 8 Jan 2019 18:21:18 +0000 (19:21 +0100)]
assimilate remove_if_complete
so spider's "double-click" action has the same feedback as sol's.
girst [Mon, 7 Jan 2019 17:12:55 +0000 (18:12 +0100)]
awful hack that un-breaks faint+bold printing
bold and faint can bet set individually, but only reset both at once.
this causes the bold attribute (useful for determining with cards are
movable) to be reset when faint was. we are splitting the string at a
known-whitespace position only if we are at the faint printed lines
(str[n]==033).
girst [Mon, 7 Jan 2019 14:20:01 +0000 (15:20 +0100)]
fix turn over bug
girst [Mon, 7 Jan 2019 14:11:09 +0000 (15:11 +0100)]
undo for spider
note that there is a bug in turn-over-detection when to==FOUNDATATION[0]
girst [Mon, 7 Jan 2019 13:16:33 +0000 (14:16 +0100)]
properly free undo allocations
girst [Mon, 7 Jan 2019 13:03:38 +0000 (14:03 +0100)]
implement undo for KLONDIKE
for now, redo has been scrapped (would require an additional field in
f., and I don't see the need)
girst [Sun, 6 Jan 2019 00:14:45 +0000 (01:14 +0100)]
implement 'up to' space/return
girst [Sun, 6 Jan 2019 00:06:14 +0000 (01:06 +0100)]
remove redundant display calls
girst [Sat, 5 Jan 2019 23:58:25 +0000 (00:58 +0100)]
undo_pop pseudo implementation
girst [Sat, 5 Jan 2019 23:09:32 +0000 (00:09 +0100)]
move data structure definition into .h
can't declare functions otherwise :|
forward declarations are a mess!
girst [Sat, 5 Jan 2019 22:57:31 +0000 (23:57 +0100)]
rename append_undo to undo_push; subs for undo_pop, free_undo
girst [Sat, 5 Jan 2019 22:01:18 +0000 (23:01 +0100)]
squash another bug
what did that semicolon here!?
note that WASTE is not -1 but 0, as it is used as the second index into
action[][]
girst [Sat, 5 Jan 2019 21:43:36 +0000 (22:43 +0100)]
fix is_movable
that's why I don't want to refactor these functions.
remember that comment?
> not extensively tested, but should work(TM)
yeah.
girst [Sat, 5 Jan 2019 20:58:26 +0000 (21:58 +0100)]
add append_undo() to all x2y() functions
one ugly hack: w2f() in klondike; the option field needs to encode both,
the uglyest scheme was chosen out of spite to my lack of planning ahead.
girst [Sat, 5 Jan 2019 20:58:05 +0000 (21:58 +0100)]
add missing function declaration to .h
girst [Sat, 5 Jan 2019 19:46:43 +0000 (20:46 +0100)]
comments on the undo feature
girst [Sat, 5 Jan 2019 19:06:45 +0000 (20:06 +0100)]
update TODOs
girst [Sat, 5 Jan 2019 18:51:33 +0000 (19:51 +0100)]
add vim folds and organize code a bit
emphasis being on "a bit".
girst [Sat, 5 Jan 2019 18:41:31 +0000 (19:41 +0100)]
factor out rank comparison
not extensively tested, but should work(TM)
girst [Sat, 5 Jan 2019 18:14:43 +0000 (19:14 +0100)]
fix ex commands not displaying, end screen cut off placeholders
girst [Fri, 4 Jan 2019 19:24:26 +0000 (20:24 +0100)]
ex command mode
girst [Fri, 4 Jan 2019 19:15:28 +0000 (20:15 +0100)]
remove interactive key help
girst [Fri, 4 Jan 2019 19:08:22 +0000 (20:08 +0100)]
change unicode_large_color, implement extreme overlap heuristic
colorscheme was unusable on white-bg terminals; extreme overlap must be
enabled with -oconsv (conserve vertical space), cutoff was chosen
arbitrarily
girst [Fri, 4 Jan 2019 18:16:27 +0000 (19:16 +0100)]
add signal handler, atexit, more vimkeys
girst [Fri, 4 Jan 2019 17:30:07 +0000 (18:30 +0100)]
implement getopt, restarting, help
girst [Fri, 4 Jan 2019 16:47:53 +0000 (17:47 +0100)]
cleanup cursor addressing
bugs squashed, looks a bit better too :)
girst [Fri, 4 Jan 2019 14:50:37 +0000 (15:50 +0100)]
cursor keys (hjkl) first pass
still needs cleanup, some minor bugs (e.g. direct -> cursor/empty in
spider doesn't work)
girst [Mon, 3 Dec 2018 22:47:11 +0000 (23:47 +0100)]
implement extreme overlap
still needs the 'when to activate' heuristic
girst [Mon, 3 Dec 2018 21:40:22 +0000 (22:40 +0100)]
cancel command w/ space; comment cleanup
girst [Mon, 3 Dec 2018 21:29:15 +0000 (22:29 +0100)]
cleanup spider:foundation
girst [Mon, 3 Dec 2018 20:41:02 +0000 (21:41 +0100)]
fix spider:foundation-overlap for unicode_small_mono (req. cleanup)
girst [Sun, 2 Dec 2018 18:37:23 +0000 (19:37 +0100)]
put is_consecutive() in sol.h
girst [Sun, 2 Dec 2018 18:03:07 +0000 (19:03 +0100)]
simplify empty tableu handling
girst [Sun, 2 Dec 2018 17:51:41 +0000 (18:51 +0100)]
don't check if stock empty
can't reverse-look through the stack otherwise
girst [Sun, 2 Dec 2018 17:45:06 +0000 (18:45 +0100)]
"optimize" foundationcheck to near unreadability
just for fun.
girst [Sun, 2 Dec 2018 17:36:21 +0000 (18:36 +0100)]
klondike: autoselect foundation (to tableu) if possible
girst [Sun, 2 Dec 2018 16:23:25 +0000 (17:23 +0100)]
spider: auto-move to empty if possible
girst [Fri, 30 Nov 2018 10:53:54 +0000 (11:53 +0100)]
move getchar() out of x2y() functions
also some minor stuff (remove remnant of deal() tester, untested
spider:remove-after-stockdeal)
girst [Thu, 29 Nov 2018 13:11:16 +0000 (14:11 +0100)]
don't allow taking from empty piles (ugly)
girst [Thu, 29 Nov 2018 12:51:49 +0000 (13:51 +0100)]
fix `make getfuns`
girst [Thu, 29 Nov 2018 12:25:33 +0000 (13:25 +0100)]
update undo data structure (comments only)
girst [Thu, 29 Nov 2018 12:08:25 +0000 (13:08 +0100)]
spider:overlapping foundation
girst [Thu, 29 Nov 2018 10:51:04 +0000 (11:51 +0100)]
simplify movable-bold
girst [Mon, 26 Nov 2018 17:47:06 +0000 (18:47 +0100)]
overlap stack in spider, some scaffolding for overlapping spider foundation
girst [Mon, 26 Nov 2018 17:18:15 +0000 (18:18 +0100)]
spider fixes, show spider stock, makefile test lineno
girst [Mon, 26 Nov 2018 17:13:43 +0000 (18:13 +0100)]
make movable cards bold (useful in spider)
this breaks 'non-bright white' color of the black cards, they now appear
white. :/ using 'bright black' is a bit too dark for my liking.
girst [Mon, 26 Nov 2018 16:57:02 +0000 (17:57 +0100)]
fix cursor hidden after exiting from win_anim()
girst [Fri, 9 Nov 2018 11:10:10 +0000 (12:10 +0100)]
fix off by one in spider remove_if_complete()
girst [Tue, 6 Nov 2018 12:38:44 +0000 (13:38 +0100)]
fix check_won
girst [Mon, 5 Nov 2018 15:35:14 +0000 (16:35 +0100)]
fix SEGV in spider
waste was defined as 11, but action[][] is only 10 wide. m(
girst [Sun, 4 Nov 2018 23:25:07 +0000 (00:25 +0100)]
restructure todos
girst [Sun, 4 Nov 2018 21:03:44 +0000 (22:03 +0100)]
remove "off-by-one", robust(er) get_cmd()
girst [Sun, 4 Nov 2018 17:02:12 +0000 (18:02 +0100)]
highlighting (dirty alpha), fix remove_if_complete, find_top
girst [Sun, 4 Nov 2018 16:59:16 +0000 (17:59 +0100)]
only reset fg-color, not all attributes
girst [Sun, 4 Nov 2018 13:48:40 +0000 (14:48 +0100)]
bugfix: could move 2 before ace to foundation
girst [Sun, 4 Nov 2018 05:21:49 +0000 (06:21 +0100)]
win screen
also removed vt220-test-scheme; will re-add when actual patterns are
decided.
girst [Sat, 3 Nov 2018 21:38:39 +0000 (22:38 +0100)]
spider should work, stuff for debugging duplicate cards,
spider: tableu to empty can select how many cards, remove full stacks
(WARN: not yet into seperate pile!)
show from/to prompt, so users know in which state they are
duplicate cards are very rare, so print out the shuffle seed if error
detected.
girst [Sat, 3 Nov 2018 18:37:55 +0000 (19:37 +0100)]
sol prototype complete, bunch of small stuff
detect if won, spider: increased tableu to num_cards*num_decks because
cards can be put ontop without following order, vt220 preliminary
charset (not really usable), ...
girst [Thu, 1 Nov 2018 13:02:52 +0000 (14:02 +0100)]
cleanup print function
girst [Wed, 31 Oct 2018 21:29:33 +0000 (22:29 +0100)]
don't exit on invalid command, use alternate screen
also get rid of the (now) unnecessary NULL termination of card 'sprites'
girst [Wed, 31 Oct 2018 13:55:31 +0000 (14:55 +0100)]
spider works, minor print cleanup
girst [Tue, 30 Oct 2018 19:21:46 +0000 (20:21 +0100)]
first working version of canfield
- undo not yet implemented (req. rework of stock/waste)
- spider move cards t2t() not implemented
- keyboard function quits game on any invalid (non-numeric) input
- many TODOs in readme, code