A collection of Xiangqi applications.
This project was originally hosted on GoogleCode at: https://code.google.com/p/hoxchess/
A collection of Xiangqi applications
A collection of Xiangqi applications.
This project was originally hosted on GoogleCode at: https://code.google.com/p/hoxchess/
Hi Huy,
I found a bug in the android jni module, the bug is in the method _IsKingFaceKing()
in hoxReferee.cpp
line 647, 648.
The problem in here is that if you have 2 kings facing each other but there is another piece stay under the red king in the same column, _IsKingFaceKing()
will return false
instead of true
.
// Check if one king is facing another.
bool
Board::_IsKingFaceKing() const
{
const Piece* blackKing = _GetKing( hoxCOLOR_BLACK );
hoxASSERT_MSG( blackKing != NULL, "Black King must not be NULL" );
const Piece* redKing = _GetKing( hoxCOLOR_RED );
hoxASSERT_MSG( redKing != NULL, "Red King must not be NULL" );
if ( ! blackKing->HasSameColumnAs( *redKing ) ) // not the same column.
return false; // Not facing
// If they are in the same column, check if there is any piece in between.
for ( PieceList::const_iterator it = m_pieces.begin();
it != m_pieces.end();
++it )
{
if ( (*it) == blackKing || (*it) == redKing )
continue;
if ( (*it)->HasSameColumnAs( *redKing ) ) // in between Kings? // BUG HERE
return false; // Not facing
}
return true; // Facing
}
The reason is because the checking method only check if there is any piece has the same column as 2 kings but lack of check if the same column piece lay between 2 kings or not.
Cheers.
Hello huygithub,
can you please build Windows 32/64 binaries of Beta Elephant , Folium and Tsito Xiangqi that are working on WinBoard 4.8.0 Interface http://www.open-aurec.com/wbforum/viewtopic.php?f=19&t=51528 ?
BetaElephant UCCI > https://github.com/milkpku/BetaElephant
Folium UCCI > https://github.com/lwm3751/folium/releases
Tsito WB > https://sourceforge.net/projects/xiangqi-engine/files/xiangqi-engine/tsito-0.8.4/
Some executables are there, but these files failed to run with WinBoard-Xiangqi-GUI.
It is possible to embed other external UCCI-/WB-compatible Chinese chess engines http://www.xqbase.com/league/enginelist.htm and HoiXiangqi WB http://www.hoicher.de/hoichess/download/build/ into HOXchess?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.