@MiiNiPaa: yeah, I had forgotten that. I've made a workaround that checks the GCC version.
Unfortunately for me I'm on Windows so clang uses whatever headers were used by the compiler that built it, so migrating to clang would be nice but libc++ is not ported to Windows.
Also, if you have a 64-bit machine, you can sue nuwen MinGW which includes pre-built boost: http://nuwen.net/mingw.html
I have a preference for using the standard C++ way unless it's more complicated than the boost way - we should discuss what to do about this particular instance though.
The default parameters should be fine for almost all cases.
[edit] About the format string:
H - insert hours (24-hour)
h - insert hours (12-hour)
m - insert minutes
s - insert seconds
? - insert a.m. or p.m.
\\ - escape following character (e.g. "\\H" => "H")
Anything else in the format string gets copied verbatim.
@chrisname I think you're trolling me. Hand-writing your own implementation when both the C++ standard library and boost provide existing solutions that work just as well?
@naraku: I'll replace the "no std::put_time" code with the boost code and keep both variants of the code (both the std::put_time variant and the boost variant) - is that OK?
As for the game itself, I'm close but not quite there with preventing certain pieces from jumping over: http://i.imgur.com/PaKgAOA.png
As you can see the capturing field extends too far, but at least the trajectory field stops like it should.
EDIT: Oh, and I fixed the thing with the black pawns not being able to capture diagonally down-right - it was a bug in Position::move (I had mapped the wrong coordinate offset to SouthEast).
EDIT: OK, things are getting weird. I've no idea what I broke: http://i.imgur.com/YvgfgW7.png http://i.imgur.com/iZsE8fe.png
I've also had a pawn (but just that pawn) able to capture arbitrary pieces completely across the board. I can't reproduce some of this.
EDIT: haha, it's because I wasn't clearing the capture positions.
Has issues but really I have to say nice work. Chess is a WAY harder game to code than many would originally credit it to be. Especially for AI components. Keep up the good work!
Ok, boost, now you just playing with me: I woke up to another crash. That time it was when compiling threading library (I think). Now I will set in to compile only filesystem and system and turn off precompiled headers.
By the way, is everyone able to build on their system?
I've only been able to test on Windows 7 64 bit with nuwen MinGW, but just now I tested on Windows Vista 32 bit with a normal MinGW installation: http://i.imgur.com/wLhhMJ7.png
Had to build boost and SFML but after that it built just fine.
Just say whether you can build or not and what OS/compiler combination. I've not yet been able to link with clang but it can compile.
Win 7 x64 with 64 bit MinGW.
Version from cplusplus repository
Builds fine. Had to wiggle with json library: it tries to store 64bit pointer in 32bit integer