From c18ac6145b77f55ff6c9d5877f0a74f62cff4a3a Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Fri, 7 Sep 2018 19:24:59 -0400 Subject: Add klon.6 --- bin/.gitignore | 3 ++- bin/Makefile | 41 ++++++++++++++++++++++++++--------------- bin/klon.6 | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 16 deletions(-) create mode 100644 bin/klon.6 diff --git a/bin/.gitignore b/bin/.gitignore index 0c078cbb..ac8b1418 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -14,9 +14,10 @@ pngo scheme wake xx -klon watch bri fbatt fbclock +klon +klon scheme.png diff --git a/bin/Makefile b/bin/Makefile index 6038d2e4..821e91d0 100644 --- a/bin/Makefile +++ b/bin/Makefile @@ -1,22 +1,29 @@ PREFIX = ~/.local -ANY_BINS = atch dtch glitch hnel modem open pbcopy pbd pbpaste pngo scheme wake xx -BSD_BINS = klon watch -LIN_BINS = bri fbatt fbclock -ALL_BINS = $(ANY_BINS) $(BSD_BINS) $(LIN_BINS) -ALL_MANS = $(ALL_BINS:%=%.1) +BINS = atch dtch glitch hnel modem open pbcopy pbd pbpaste pngo scheme wake xx +BINS_BSD = watch +BINS_LINUX = bri fbatt fbclock +BINS_ALL = $(BINS) $(BINS_BSD) $(BINS_LINUX) $(GAMES_BSD) + +GAMES_BSD = klon +GAMES_ALL = $(GAMES_BSD) + +MAN1 = $(BINS_ALL:%=%.1) +MAN6 = $(GAMES_ALL:%=%.6) CFLAGS += -Wall -Wextra -Wpedantic LDLIBS = -lcurses -lm -lutil -lz -any: .gitignore tags $(ANY_BINS) +any: .gitignore tags $(BINS) -bsd: any $(BSD_BINS) +bsd: any $(BINS_BSD) $(GAMES_BSD) -linux: any $(LIN_BINS) +linux: any $(BINS_LINUX) .gitignore: Makefile - echo tags scheme.h *.o $(ALL_BINS) scheme.png | tr ' ' '\n' > .gitignore + echo tags scheme.h *.o $(BINS_ALL) $(GAMES_ALL) scheme.png \ + | tr ' ' '\n' \ + > .gitignore tags: *.c ctags -w *.c @@ -40,13 +47,17 @@ setuid: bri chmod u+s bri clean: - rm -f tags $(ALL_BINS) + rm -f tags $(BINS_ALL) $(GAMES_ALL) link: - mkdir -p $(PREFIX)/bin $(PREFIX)/share/man/man1 - ln -s -f $(ALL_BINS:%=$(PWD)/%) $(PREFIX)/bin - ln -s -f $(ALL_MANS:%=$(PWD)/%) $(PREFIX)/share/man/man1 + mkdir -p $(PREFIX)/bin $(PREFIX)/share/man/man1 $(PREFIX)/share/man/man6 + ln -s -f $(BINS_ALL:%=$(PWD)/%) $(PREFIX)/bin + ln -s -f $(GAMES_ALL:%=$(PWD)/%) $(PREFIX)/bin + ln -s -f $(MAN1:%=$(PWD)/%) $(PREFIX)/share/man/man1 + ln -s -f $(MAN6:%=$(PWD)/%) $(PREFIX)/share/man/man6 unlink: - rm -f $(ALL_BINS:%=$(PREFIX)/bin/%) - rm -f $(ALL_MANS:%=$(PREFIX)/share/man/man1/%) + rm -f $(BINS_ALL:%=$(PREFIX)/bin/%) + rm -f $(GAMES_ALL:%=$(PREFIX)/bin/%) + rm -f $(MAN1:%=$(PREFIX)/share/man/man1/%) + rm -f $(MAN6:%=$(PREFIX)/share/man/man6/%) diff --git a/bin/klon.6 b/bin/klon.6 new file mode 100644 index 00000000..5b280ed5 --- /dev/null +++ b/bin/klon.6 @@ -0,0 +1,34 @@ +.Dd $Mdocdate$ +.Dt KLON 6 +.Os "Causal Agency" +.Sh NAME +.Nm klon +.Nd Klondike solitaire +.Sh SYNOPSIS +.Nm +.Sh DESCRIPTION +.Nm +is a curses Klondike solitaire game. +.Pp +The keys are as follows: +.Bl -tag -width Ds +.It Ic q +Quit. +.It Ic u +Undo. +.It Ic space +Draw from stock to waste. +.It Ic w +Select waste. +.It Ic a-d +Select foundation. +.It Ic 1-7 +Select tableau. +.It Ic enter +Move to any foundation. +.El +.Sh CAVEATS +.Nm +does not support Linux +since it uses +.Xr arc4random_uniform 3 . -- cgit 1.4.1