]> git.gir.st - solVItaire.git/log
solVItaire.git
5 years agofix is_movable
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.

5 years agoadd append_undo() to all x2y() functions
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.

5 years agoadd missing function declaration to .h
girst [Sat, 5 Jan 2019 20:58:05 +0000 (21:58 +0100)]
add missing function declaration to .h

5 years agocomments on the undo feature
girst [Sat, 5 Jan 2019 19:46:43 +0000 (20:46 +0100)]
comments on the undo feature

5 years agoupdate TODOs
girst [Sat, 5 Jan 2019 19:06:45 +0000 (20:06 +0100)]
update TODOs

5 years agoadd vim folds and organize code a bit
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".

5 years agofactor out rank comparison
girst [Sat, 5 Jan 2019 18:41:31 +0000 (19:41 +0100)]
factor out rank comparison

not extensively tested, but should work(TM)

5 years agofix ex commands not displaying, end screen cut off placeholders
girst [Sat, 5 Jan 2019 18:14:43 +0000 (19:14 +0100)]
fix ex commands not displaying, end screen cut off placeholders

5 years agoex command mode
girst [Fri, 4 Jan 2019 19:24:26 +0000 (20:24 +0100)]
ex command mode

5 years agoremove interactive key help
girst [Fri, 4 Jan 2019 19:15:28 +0000 (20:15 +0100)]
remove interactive key help

5 years agochange unicode_large_color, implement extreme overlap heuristic
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

5 years agoadd signal handler, atexit, more vimkeys
girst [Fri, 4 Jan 2019 18:16:27 +0000 (19:16 +0100)]
add signal handler, atexit, more vimkeys

5 years agoimplement getopt, restarting, help
girst [Fri, 4 Jan 2019 17:30:07 +0000 (18:30 +0100)]
implement getopt, restarting, help

5 years agocleanup cursor addressing
girst [Fri, 4 Jan 2019 16:47:53 +0000 (17:47 +0100)]
cleanup cursor addressing

bugs squashed, looks a bit better too :)

5 years agocursor keys (hjkl) first pass
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)

5 years agoimplement extreme overlap
girst [Mon, 3 Dec 2018 22:47:11 +0000 (23:47 +0100)]
implement extreme overlap

still needs the 'when to activate' heuristic

5 years agocancel command w/ space; comment cleanup
girst [Mon, 3 Dec 2018 21:40:22 +0000 (22:40 +0100)]
cancel command w/ space; comment cleanup

5 years agocleanup spider:foundation
girst [Mon, 3 Dec 2018 21:29:15 +0000 (22:29 +0100)]
cleanup spider:foundation

5 years agofix spider:foundation-overlap for unicode_small_mono (req. cleanup)
girst [Mon, 3 Dec 2018 20:41:02 +0000 (21:41 +0100)]
fix spider:foundation-overlap for unicode_small_mono (req. cleanup)

5 years agoput is_consecutive() in sol.h
girst [Sun, 2 Dec 2018 18:37:23 +0000 (19:37 +0100)]
put is_consecutive() in sol.h

5 years agosimplify empty tableu handling
girst [Sun, 2 Dec 2018 18:03:07 +0000 (19:03 +0100)]
simplify empty tableu handling

5 years agodon't check if stock empty
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

5 years ago"optimize" foundationcheck to near unreadability
girst [Sun, 2 Dec 2018 17:45:06 +0000 (18:45 +0100)]
"optimize" foundationcheck to near unreadability

just for fun.

5 years agoklondike: autoselect foundation (to tableu) if possible
girst [Sun, 2 Dec 2018 17:36:21 +0000 (18:36 +0100)]
klondike: autoselect foundation (to tableu) if possible

5 years agospider: auto-move to empty if possible
girst [Sun, 2 Dec 2018 16:23:25 +0000 (17:23 +0100)]
spider: auto-move to empty if possible

5 years agomove getchar() out of x2y() functions
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)

5 years agodon't allow taking from empty piles (ugly)
girst [Thu, 29 Nov 2018 13:11:16 +0000 (14:11 +0100)]
don't allow taking from empty piles (ugly)

5 years agofix `make getfuns`
girst [Thu, 29 Nov 2018 12:51:49 +0000 (13:51 +0100)]
fix `make getfuns`

5 years agoupdate undo data structure (comments only)
girst [Thu, 29 Nov 2018 12:25:33 +0000 (13:25 +0100)]
update undo data structure (comments only)

5 years agospider:overlapping foundation
girst [Thu, 29 Nov 2018 12:08:25 +0000 (13:08 +0100)]
spider:overlapping foundation

5 years agosimplify movable-bold
girst [Thu, 29 Nov 2018 10:51:04 +0000 (11:51 +0100)]
simplify movable-bold

5 years agooverlap stack in spider, some scaffolding for overlapping spider foundation
girst [Mon, 26 Nov 2018 17:47:06 +0000 (18:47 +0100)]
overlap stack in spider, some scaffolding for overlapping spider foundation

5 years agospider fixes, show spider stock, makefile test lineno
girst [Mon, 26 Nov 2018 17:18:15 +0000 (18:18 +0100)]
spider fixes, show spider stock, makefile test lineno

5 years agomake movable cards bold (useful in spider)
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.

5 years agofix cursor hidden after exiting from win_anim()
girst [Mon, 26 Nov 2018 16:57:02 +0000 (17:57 +0100)]
fix cursor hidden after exiting from win_anim()

5 years agofix off by one in spider remove_if_complete()
girst [Fri, 9 Nov 2018 11:10:10 +0000 (12:10 +0100)]
fix off by one in spider remove_if_complete()

5 years agofix check_won
girst [Tue, 6 Nov 2018 12:38:44 +0000 (13:38 +0100)]
fix check_won

5 years agofix SEGV in spider
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(

5 years agorestructure todos
girst [Sun, 4 Nov 2018 23:25:07 +0000 (00:25 +0100)]
restructure todos

5 years agoremove "off-by-one", robust(er) get_cmd()
girst [Sun, 4 Nov 2018 21:03:44 +0000 (22:03 +0100)]
remove "off-by-one", robust(er) get_cmd()

5 years agohighlighting (dirty alpha), fix remove_if_complete, find_top
girst [Sun, 4 Nov 2018 17:02:12 +0000 (18:02 +0100)]
highlighting (dirty alpha), fix remove_if_complete, find_top

5 years agoonly reset fg-color, not all attributes
girst [Sun, 4 Nov 2018 16:59:16 +0000 (17:59 +0100)]
only reset fg-color, not all attributes

5 years agobugfix: could move 2 before ace to foundation
girst [Sun, 4 Nov 2018 13:48:40 +0000 (14:48 +0100)]
bugfix: could move 2 before ace to foundation

5 years agowin screen
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.

5 years agospider should work, stuff for debugging duplicate cards,
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.

5 years agosol prototype complete, bunch of small stuff
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), ...

5 years agocleanup print function
girst [Thu, 1 Nov 2018 13:02:52 +0000 (14:02 +0100)]
cleanup print function

5 years agodon't exit on invalid command, use alternate screen
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'

5 years agospider works, minor print cleanup
girst [Wed, 31 Oct 2018 13:55:31 +0000 (14:55 +0100)]
spider works, minor print cleanup

5 years agofirst working version of canfield
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

Imprint / Impressum