Skip to content

Commit

Permalink
Added all project files
Browse files Browse the repository at this point in the history
  • Loading branch information
jstitch committed Mar 14, 2011
1 parent ef71032 commit 92f57a1
Show file tree
Hide file tree
Showing 11 changed files with 1,481 additions and 0 deletions.
9 changes: 9 additions & 0 deletions BUGS
@@ -0,0 +1,9 @@
MasterMind 1.1b


BUGS
----

1) There is a bug when using a display terminal of less than 25 lines, the
messages displayed in the bottom line may get overlapped with other screen
output, specially in the 'playing the game' screen.
33 changes: 33 additions & 0 deletions HISTORY
@@ -0,0 +1,33 @@
MasterMind 1.1b


HISTORY
-------

version 1.0 was first done at my school days at ESCOM (Escuela Superior de
Computo, from the IPN - Instituto Politecnico Nacional at Mexico city) in
1998, as my first school project in C for the first semester of Programming
Languages in that school. It is perhaps the first game I've ever wrote (note,
though, that it is not my first program, I've been programming in C since my
nbachelor days, sometime around 1996, and have done primitive programming in
prehistoric languages like BASIC some years before too). Why I chose Master
Mind as my first programming project in C has its history too: when I was an
almost 12 years old kid, I've got operated from my appendix, and someone
(can't remember who, perhaps some aunt), gave me as a gift a version of that
fine mental board game. Since then it's been one of my favorites (despite the
fact that I play it seldom, just as seldom as I used to maintain this program
unitl now :-P)

version 1.0.1 improved the help and about online sections

version 1.0.2 came from my efforts in 2006 to upgrade the program so the Three
Wise Men (the 'Tres Reyes Magos', a mexican tradition (and surely from some
other places with hispanic/catholic traditions) for kids celebrated every 6th
january) could give my then girlfriend (and now wife) a nice gift ;-) Since
she is a psychologist, she had told me about an evaluation scale for the
Master Mind game, which I included in this version

version 1.1, the current version, is the port to GNU/Linux of MasterMind

version 1.1b came from a patch by Felix Herrmann so that colorblind people can
play the game by showing the number of the inputs, besides of the color
29 changes: 29 additions & 0 deletions INSTALL
@@ -0,0 +1,29 @@
MasterMind 1.1b


COMPILING
---------

MasterMind just needs the Curses library, so doing a

cc masterm.c -lncurses -o masterm

might be just enough.

There is a makefile included, so running

make

is the easiest way. Please mind that the makefile supposes you have GCC
installed on your system

There is a colorblind target, to compile masterm for colorblind support:

make colorblind


RUNNING
-------

Once compiled, a file named masterm should be generated. Just run that and
ENJOY!
339 changes: 339 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions Makefile
@@ -0,0 +1,16 @@
all : masterm.c masterm.h cursors.h curstextlib.h
gcc masterm.c -W -Wall -lncurses -o masterm
chmod +x masterm

colorblind : masterm.c masterm.h cursors.h curstextlib.h
gcc masterm.c -W -Wall -lncurses -o masterm -DCOLORBLIND
chmod +x masterm

debug : masterm.c masterm.h cursors.h curstextlib.h
gcc masterm.c -W -Wall -lncurses -o masterm -g
chmod +x masterm

clean :
chmod -x *
rm masterm
rm *~
35 changes: 35 additions & 0 deletions TODO
@@ -0,0 +1,35 @@
MasterMind 1.1b


TODO
----

1) I wish to separate CLEANLY the engine of the game from the interface.

Efforts to bring version 1.1 have made an almost complete restructuration of
the code, by adding .h files (originally everything was in a single .c file!),
each one of them tries to execute specialized tasks: masterm.c and masterm.h
try to be the engine, cursors.h and curstextlib.h try to be the cursors
interface (therefore bringing up the possibility to have another interface
too).

Maybe a good solution would be to have the engine as a separate process
expecting commands via a socket (or some other kind of IPC), and emitting
results in the same way. That way, the interface could be the program the user
calls, with any interface you choose (cursors, text mode, etc.), and this
interface program then exec()s the engine and communicates with it via the
commands & through the socket. I don't know, have to think about it a little
more for a while...


2) I haven't tested 1.1 for MS-DOS compatibility, and perhaps I won't, but if
there's someone willing to do that, and help me fix any problems, I will be
glad to receive the extra help. Since 1.1, I tried to abstract the behaviour
of the interface from the engine, so I changed the conio routines embedded in
the code to more general calls, in the effort to make curses the default
cursors library, so the changes might have broken something about the conio
library...


3) I surely have to translate Master Mind's interface to English. A good
localization to support multiple languages might be the best solution.

0 comments on commit 92f57a1

Please sign in to comment.