Code Monkey home page Code Monkey logo

hoxchess's Introduction

hoxchess's People

Contributors

huygithub avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hoxchess's Issues

Beta Elephant - Folium - Tsito: Windows binaries required that are running on WinBaord 4.8.0.

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?

King Face Bug

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.