Click here to Skip to main content
15,881,803 members
Articles / Programming Languages / C#

Simple AI for the Game of Breakthrough

Rate me:
Please Sign up or sign in to vote.
5.00/5 (11 votes)
5 Jun 2009LGPL39 min read 65.4K   3.7K   39  
This article presents an implementation of a simple alpha-beta player for the board game of Breakthrough.
namespace Breakthrough.Game.Engine
{
    internal struct BoardSquare
    {
        internal GamePiece CurrentPiece;
        internal BoardSquare(BoardSquare square)
        {
            CurrentPiece = new GamePiece(square.CurrentPiece);
        }

        public override string ToString()
        {
            return (CurrentPiece != null ? CurrentPiece.PieceColor.ToString() : "");
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU Lesser General Public License (LGPLv3)


Written By
Chief Technology Officer Misakai Ltd.
Ireland Ireland
Roman Atachiants, Ph.D. is the architect behind emitter.io service, a real-time, low-latency publish/subscribe service for IoT, Gaming. He is a software engineer and scientist with extensive experience in different computer science domains, programming languages/principles/patterns & frameworks.

His main expertise consists of C# and .NET platform, game technologies, cloud, human-computer interaction, big data and artificial intelligence. He has an extensive programming knowledge and R&D expertise.



Comments and Discussions