summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPreston Pan <preston@nullring.xyz>2023-02-06 20:11:03 -0800
committerPreston Pan <preston@nullring.xyz>2023-02-06 20:11:38 -0800
commitd9b0f00ebec0c90a70bc823f8d3eb5af1128a605 (patch)
tree95f440f907b3cb398194f2db27b58a8d4f4041db
parent0d8e3fb79c4de063991b923adcc599a86d2c8cb6 (diff)
committing before pull
-rw-r--r--doc/.tetris3.1.swpbin0 -> 12288 bytes
-rw-r--r--doc/tetris3.135
-rw-r--r--tetris.c11
-rw-r--r--tetris.h1
4 files changed, 47 insertions, 0 deletions
diff --git a/doc/.tetris3.1.swp b/doc/.tetris3.1.swp
new file mode 100644
index 0000000..2028b77
--- /dev/null
+++ b/doc/.tetris3.1.swp
Binary files differ
diff --git a/doc/tetris3.1 b/doc/tetris3.1
new file mode 100644
index 0000000..493ba4d
--- /dev/null
+++ b/doc/tetris3.1
@@ -0,0 +1,35 @@
+.TH TETRIS3 1 "23 Feb 06" "Tetris3 version 1.0"
+.SH NAME
+tetris3 \- small command line tetris program
+
+.SH SYNOPSIS
+\fBtetris3\fP [--version] [--help]
+
+.SH DESCRIPTION
+
+.SS Options
+\fB--version\fP
+\-\- Displays version info, and license information.
+
+\fB--help\fP
+\-\- Displays the usage information for the tetris3 program.
+
+\fB--size\fP
+\-\- Sets the board size - the board is a square so only one number is taken as an input.
+
+\fB--speed\fP
+\-\- Sets the speed of the snake - up to 10.
+
+\fB--obstacles\fP
+\-\- Sets the amount of obstacles that are generated.
+
+.SH AUTHORS
+Developed and maintained by Kai Stevenson and Preston Pan.
+See https://www.aberrantflux.xyz/cgit/snake3.git for the newest version
+of the software.
+
+.SH BUGS
+Once in a while, you will notice that the snake goes through the food that it is trying to eat. This is not that annoying but it's a bug.
+
+.SH "SEE ALSO"
+vi(1)
diff --git a/tetris.c b/tetris.c
index 6b3446c..88a99f3 100644
--- a/tetris.c
+++ b/tetris.c
@@ -1,6 +1,8 @@
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
+#include <sys/ioctl.h>
+#include <string.h>
#define UNUSED(x) (void)(x)
@@ -12,12 +14,21 @@ void interrupt_handler(int sig) {
g_int_ctrl_c = 1;
}
+void parse_args(int argc, char **argv) {
+
+}
+void die(void) {
+
+}
int main (int argc, char **argv) {
+ parse_args(argc, argv);
int width;
int height;
/* handle SIGINT interrupts */
signal(SIGINT, interrupt_handler);
+ /* Hide cursor */
+ print("\033[?251");
/* Game Loop */
while (1) {
}
diff --git a/tetris.h b/tetris.h
index b321186..3a201fa 100644
--- a/tetris.h
+++ b/tetris.h
@@ -1,4 +1,5 @@
#ifndef TETRIS_H
#define TETRIS_H
void interrupt_handler(int sig);
+void die(void);
#endif