C#eckmate
C#eckmate
Learning C# and Programming Chess
About the Book
I want this text to serve two purposes: learning the C# programming language, and programming a sophisticated implementation of chess.
Why chess? The game is complicated yet familiar. Piece movements are easy to program, but with enough patterns and complexity to make effective demonstrations of various software engineering and architecture techniques. There will be many tricks to explore when deciding how to represent a chess game's state, and many of C#'s language features will simplify our designs and improve the cohesion and coupling of our code. We'll learn about design patterns when fitting chess into a generic board game-playing application, and find a visceral pleasure when we program a user interface for the game, complete with an artificial intelligence opponent. In short, chess (and board games in general) ties together a great number of topics in computer science, and the sophisticated implementation we'll cover in this book should provide a number of learning opportunities beyond simple proficiency in the C# programming language.
This book is a work in progress!
I plan to develop this book in five milestones:
- Milestone 1: the entirety of Part 2, and a few excerpts from Part 1. Designing a framework for modeling board games and playing them in a console application. Programming Othello and chess in particular. C# language features like collections and LINQ necessary for best practices in the model.
- Milestone 2: the rest of Part 1. Finish the C# language overview chapters, making the book more appropriate for those wishing to learn C# from the beginning.
- Milestone 3: a copy-edit and clarification pass on Milestones 1 and 2. I'll add more exercises, examples, and expand on topics based on early feedback.
- Milestone 4: the entirety of Part 3. Develop a GUI application for playing board games. GUI implementations of Othello and chess.
Milestones 1-4 are complete!
- Milestone 5: the entirety of Part 4. Build a general computer AI opponent for board games, integrated into the console and GUI applications. Performance tuning for chess implementations.
Table of Contents
* denotes a planned chapter.
Part I: Learning C#
- .NET Framework
- Visual Studio
- Fundamentals of C#
- Declaring Types in C#
- Collections
- LINQ
Part II: Programming Board Games
- Board Game Design
- Programming Othello
- Testing Othello
- Programming Chess
- Testing Chess
Part III: Visual Board Games and Graphical User Interfaces
- User Interfaces With WPF
- Visual Board Game Design
- Visual Othello
- Visual Chess
Part IV: Artificial Intelligence
- AI Opponents and the Minimax Algorithm*
- Integrating AI into Applications*
- Profiling Chess*
- Optimizing Chess for AI*
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $14 millionwriting, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them