Skip to content
This repository has been archived by the owner on May 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #9 from besser82/improvements
Browse files Browse the repository at this point in the history
add manpage
  • Loading branch information
Tiehuis committed Dec 5, 2014
2 parents a9505d9 + 986bb70 commit 2a69fdf
Show file tree
Hide file tree
Showing 5 changed files with 309 additions and 4 deletions.
19 changes: 15 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
CC ?= gcc
CFLAGS += -Wall -Wextra
LIBS = -lcurses
ASCIIDOC ?= a2x
CC ?= gcc
CFLAGS := -Wall -Wextra $(CFLAGS)
LIBS = -lcurses

all: 2048
.PHONY: clean man man-nc

2048: src/2048.c
$(CC) $(CFLAGS) $(LDFLAGS) $(LIBS) src/2048.c -o 2048

2048nc: src/2048.c
$(CC) -DNO_CURSES=1 $(CFLAGS) $(LDFLAGS) src/2048.c -o 2048nc

all: 2048

clean:
rm -f 2048 2048nc

man:
rm -f man/2048.1
$(ASCIIDOC) -d manpage -f manpage man/2048.1.txt

man-nc:
rm -f man/2048nc.1
$(ASCIIDOC) -d manpage -f manpage man/2048nc.1.txt
92 changes: 92 additions & 0 deletions man/2048.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
'\" t
.\" Title: \e20\e4\e8
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\" Date: 12/05/2014
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
.TH "\E20\E4\E8" "1" "12/05/2014" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
2048 \- The game 2048 for your Linux terminal
.SH "SYNOPSIS"
.sp
\fB2048\fR [\fIOPTIONS\fR]
.SH "DESCRIPTION"
.sp
A cli version of the game 2048 for your Linux terminal\&.
.SH "OPTIONS"
.PP
\fB\-s\fR \fIsize\fR
.RS 4
Set the grid border length to
\fIsize\fR\&.
.RE
.PP
\fB\-b\fR \fIrate\fR
.RS 4
Set the block spawn rate to
\fIrate\fR\&.
.RE
.PP
\fB\-r\fR
.RS 4
Resets hiscore\&. Will prompt user\&.
.RE
.PP
\fB\-c\fR
.RS 4
Enables color support\&.
.RE
.PP
\fB\-C\fR
.RS 4
Disables color support\&.
.RE
.PP
\fB\-h\fR
.RS 4
Display usage information\&.
.RE
.SH "CONTROLS"
.PP
\fBhjkl or *wasd\fR or \fBarrow keys\fR
.RS 4
Movement
.RE
.PP
\fBq\fR
.RS 4
Quit the game\&.
.RE
.SH "AUTHOR"
.sp
2048 was originally written by Thiehuis\&. Some people have contributed to it\&.
.sp
This manpage is Copyright (C) 2014 Björn Esser and licensed under the terms of the MIT License (MIT)\&.
.SH "RESOURCES"
.sp
github: https://github\&.com/Tiehuis/2048\-cli/
.SH "COPYING"
.sp
Copyright (C) 2014 Tiehuis\&. Free use of this software is granted under the terms of the MIT License (MIT)\&.
62 changes: 62 additions & 0 deletions man/2048.1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
\20\4\8(1)
===========
:doctype: manpage


NAME
----
2048 - The game 2048 for your Linux terminal


SYNOPSIS
--------
*2048* ['OPTIONS']


DESCRIPTION
-----------
A cli version of the game 2048 for your Linux terminal.


OPTIONS
-------
*-s* 'size'::
Set the grid border length to 'size'.
*-b* 'rate'::
Set the block spawn rate to 'rate'.
*-r*::
Resets hiscore. Will prompt user.
*-c*::
Enables color support.
*-C*::
Disables color support.
*-h*::
Display usage information.


CONTROLS
--------
*hjkl or *wasd* or *arrow keys*::
Movement
*q*::
Quit the game.


AUTHOR
------
2048 was originally written by Thiehuis. Some people have
contributed to it.

This manpage is Copyright \(C) 2014 Björn Esser and licensed
under the terms of the MIT License (MIT).


RESOURCES
---------
github: <https://github.com/Tiehuis/2048-cli/>


COPYING
-------
Copyright \(C) 2014 Tiehuis. Free use of this software is
granted under the terms of the MIT License (MIT).
82 changes: 82 additions & 0 deletions man/2048nc.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
'\" t
.\" Title: \e20\e4\e8nc
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\" Date: 12/05/2014
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
.TH "\E20\E4\E8NC" "1" "12/05/2014" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
2048nc \- The game 2048 for your Linux terminal
.SH "SYNOPSIS"
.sp
\fB2048nc\fR [\fIOPTIONS\fR]
.SH "DESCRIPTION"
.sp
A non\-ncurses cli version of the game 2048 for your Linux terminal\&.
.SH "OPTIONS"
.PP
\fB\-s\fR \fIsize\fR
.RS 4
Set the grid border length to
\fIsize\fR\&.
.RE
.PP
\fB\-b\fR \fIrate\fR
.RS 4
Set the block spawn rate to
\fIrate\fR\&.
.RE
.PP
\fB\-r\fR
.RS 4
Resets hiscore\&. Will prompt user\&.
.RE
.PP
\fB\-h\fR
.RS 4
Display usage information\&.
.RE
.SH "CONTROLS"
.PP
\fBhjkl\fR or \fBwasd\fR
.RS 4
Movement
.RE
.PP
\fBq\fR
.RS 4
Quit the game\&.
.RE
.SH "AUTHOR"
.sp
2048nc was originally written by Thiehuis\&. Some people have contributed to it\&.
.sp
This manpage is Copyright (C) 2014 Björn Esser and licensed under the terms of the MIT License (MIT)\&.
.SH "RESOURCES"
.sp
github: https://github\&.com/Tiehuis/2048\-cli/
.SH "COPYING"
.sp
Copyright (C) 2014 Tiehuis\&. Free use of this software is granted under the terms of the MIT License (MIT)\&.
58 changes: 58 additions & 0 deletions man/2048nc.1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
\20\4\8nc(1)
===========
:doctype: manpage


NAME
----
2048nc - The game 2048 for your Linux terminal


SYNOPSIS
--------
*2048nc* ['OPTIONS']


DESCRIPTION
-----------
A non-ncurses cli version of the game 2048 for your Linux terminal.


OPTIONS
-------
*-s* 'size'::
Set the grid border length to 'size'.
*-b* 'rate'::
Set the block spawn rate to 'rate'.
*-r*::
Resets hiscore. Will prompt user.
*-h*::
Display usage information.


CONTROLS
--------
*hjkl* or *wasd*::
Movement
*q*::
Quit the game.


AUTHOR
------
2048nc was originally written by Thiehuis. Some people have
contributed to it.

This manpage is Copyright \(C) 2014 Björn Esser and licensed
under the terms of the MIT License (MIT).


RESOURCES
---------
github: <https://github.com/Tiehuis/2048-cli/>


COPYING
-------
Copyright \(C) 2014 Tiehuis. Free use of this software is
granted under the terms of the MIT License (MIT).

0 comments on commit 2a69fdf

Please sign in to comment.