Update of /cvsroot/fink/dists/10.2/unstable/main/finkinfo/games
In directory usw-pr-cvs1:/tmp/cvs-serv11540
Added Files:
connect4-1.2-1.info connect4-1.2-1.patch
Removed Files:
connect4-1.1-4.info connect4-1.1-4.patch
Log Message:
New version
--- NEW FILE: connect4-1.2-1.info ---
Package: connect4
Version: 1.2
Revision: 1
Patch: %f.patch
Source: http://members.tripod.com/boneheadproductions/%n/dl/%nv%v.tar.gz
Source-MD5: c6260a22aa1807f243eb43941cd8a0c1
GCC: 3.1
CompileScript: <<
c++ *.cpp -O2 -ffast-math -fforce-addr -fomit-frame-pointer -finline-functions -o %n
tail -2 README.txt >> LICENSE
<<
InstallScript: <<
mkdir -p %i/bin/
install -s %n %i/bin/
<<
DocFiles: README.txt LICENSE
Description: Text-based Connect Four game.
DescDetail: <<
An exploration into artificial intelligence.
There are many computer players. Each uses slightly different
heuristics. When you set the computer's level you are essentially
telling it how many moves to look ahead in the beginning (it looks ahead
further as the game progresses). You can play human vs. human, human vs.
computer, or computer vs. computer. When the computer fights itself you
can set a different level and heuristic for each player.
The AI can be quite good, making it difficult to win if you do not
make good moves in the early game.
<<
DescPort: <<
Note: iostream I/O seems to be a move behind in Jaguar.
<<
License: GPL
Maintainer: Ben Hines <[EMAIL PROTECTED]>
Homepage: http://members.tripod.com/boneheadproductions/connect4/
--- NEW FILE: connect4-1.2-1.patch ---
--- connect4v1.1/bd_string.cpp 2002-09-27 19:20:25.000000000 -0700
+++ connect4v1.1/bd_string.cpp 2002-09-27 19:20:53.000000000 -0700
@@ -4,6 +4,37 @@
#include <ctype.h>
#include "bd_string.h"
+// myGetline:
+// The gcc 3.1 version of the 'getline' function has a bug - it requires
+// two delimiters (e.g. newlines) before it accepts the input
+// See gcc problem report # 6648
+// The 'myGetline' function provides a replacement for 'getline'
+// Sample use: char name[100]; myGetline(cin, name, 100);
+
+std::istream& myGetline(std::istream& in, char* buffer, std::streamsize n, char delim
+=
+'\n')
+{
+ if (in.peek() == delim)
+ {
+ // the gcc 3.1 version of the 'get' function fails if there
+ // are no characters before the delimiter (e.g. an empty line).
+ // This would seem to be a bug but the discussion on gcc problem
+ // report # 4419 says that this behaviour accords with the standard.
+
+ buffer[0] = '\0';
+ }
+ else
+ {
+ in.get(buffer, n, delim);
+ }
+
+ if (in.good() && strlen(buffer) < n - 1)
+ {
+ // eat the delimiter
+ in.ignore(1);
+ }
+ return in;
+}
String::String()
{
@@ -410,7 +441,7 @@
temp=new char[maxChar];
- inputStream.getline(temp, maxChar);
+ myGetline(inputStream, temp, maxChar);
*this=temp;
delete [] temp;
--- connect4-1.1-4.info DELETED ---
--- connect4-1.1-4.patch DELETED ---
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Fink-commits mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-commits