Skip to content

Copy - paste bug in SharpChess Brain #12

@ottomatic

Description

@ottomatic

Hi,

I am about to embark on an attempt to implement a chess engine written in c#. Researching if there are existing reusable WinBoard protocol implementations I came across the SharpChess codebase here on GitHub.

As I peeked into the code I found an apparent copy – paste bug around line 308 of Brain.cs.

The code reads:

            if (this.MyPlayer.CanClaimInsufficientMaterialDraw)
            {
                WinBoard.SendDrawByFiftyMoveRule();
                return;
            }

But should read:

            if (this.MyPlayer.CanClaimInsufficientMaterialDraw)
            {
                WinBoard.SendDrawByInsufficientMaterial();
                return;
            }

I can’t be arsed to fork the code and create a pull request, so I'm posting like this instead.

This is no showstopper as the draw will be claimed regardless. But the reason fo the claim might look strange to a human reader.

Regards!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions