diff --git a/Makefile b/Makefile index 9634798..7284d88 100644 --- a/Makefile +++ b/Makefile @@ -9,9 +9,8 @@ MAN_DIR?=/usr/share/man/man6 CFLAGS+= -Wno-unused-result -D SCORES_DIR=\"$(SCORES_DIR)\" LDFLAGS+= -lncurses -lm -COLORMODE:=FGCOLOR -ALL= jewels sudoku mines reversi checkers battleship rabbithole sos pipes fifteen memoblocks fisher muncher miketron redsquare darrt snakeduel logik +ALL= jewels sudoku mines reversi checkers battleship rabbithole sos pipes fifteen memoblocks fisher muncher miketron redsquare darrt snakeduel SCORE_FILES= pipes_scores jewels_scores miketron_scores muncher_scores fisher_scores darrt_scores all: $(ALL) @@ -54,11 +53,9 @@ redsquare: redsquare.c config.h $(CC) redsquare.c $(LDFLAGS) $(CFLAGS) -o ./redsquare darrt: darrt.c config.h common.h $(CC) darrt.c $(LDFLAGS) $(CFLAGS) -o ./darrt + snakeduel: snakeduel.c config.h $(CC) snakeduel.c $(LDFLAGS) $(CFLAGS) -o ./snakeduel -logik: logik.c - $(CC) $@.c -o $@ -D$(COLORMODE) - clean: rm $(ALL) uninstall: diff --git a/README.md b/README.md index f8b6328..0789f94 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,6 @@ The games include: * Redsquare (Conway's Game of Life made playable!) * Darrt (with original gameplay!) * Snakeduel -* Logik (or also known as Mastermind) The difficulty and/or dimensions are adjustable through simple command line options, you can play a minesweeper game that take hours to complete, or exprience hexadecimal sudoku and 8x8 fifteen-like puzzles! diff --git a/logik.c b/logik.c deleted file mode 100644 index 2607528..0000000 --- a/logik.c +++ /dev/null @@ -1,148 +0,0 @@ -#include -#include -#include -#include - - -#define NBHOLES 5 -#define NBLINES 10 -#define NBCOLORS 8 -#define NBMINUS 5 -unsigned char pion[] = "rgypmRGY"; - -int -convert(unsigned char a) { - - for(int i=0; i 0 ) { - inc[i] = convert(c); - i++; - stop = 0; - } - if( i > 0 & c == 'x' ) { /*aimed to backspace*/ - i--; - printf("\b"); - stop = 0; - } - if( c == 'Q' ) { - stop++; - if( stop == 2) - break; - } - } - printf("\t"); - - if( stop == 2 ) - break; - - black=0; white=0; - /* black section : x : is in the right place */ - for(int i=0; i 0) & (tmp[i] > 0) ) { - if( tmp[i] <= mix[i] ) - white += tmp[i]; - else if ( mix[i] < tmp[i] ) - white += mix[i]; - } - - /* fmt */ - for(int i=0; i < NBHOLES - white ; i++) - printf("-"); - - for(int i=0; i < black; i++) - printf("x"); - - for(int i=0; i < white - black; i++) - printf("o"); - - if( black == 5 ) { - system("/bin/stty cooked"); - printf("\n\tYOU WIN\n"); - return 0; - } - for(int i=0; i