C#eckmate
$7.99
Minimum price
$11.99
Suggested price

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.
  • Share this book

  • Categories

    • .NET
    • Software Architecture
  • Installments completed

    4 / 5

  • Feedback

    Email the Author(s)

About the Author

Neal Terrell
Neal Terrell

Hi, I'm Neal! I am a lecturer in the Computer Engineering and Computer Science department at California State University Long Beach. What's a lecturer? We are faculty members who only teach, as opposed to professors who do research, publish, and administer a department. All the time that professors spend advancing the state of the art of computer science, I get to spend learning and practicing to be a better teacher.

I teach a lot of different courses: theory and mathematics classes like discrete math, algorithms, and data structures; programming-focused classes like introductory Python and intermediate Java and C++; and senior electives in programming language theory and design, search engine technology and information theory, and .NET development. My students know me (I think) as a challenging but fair instructor who demands a lot but provides the resources necessary for success to those who seek them.

I have been programming with C# since 2002, and it remains my favorite programming language. I am also proficient in C++0x, Java, Python, JavaScript, Clojure, F#, and know enough Erlang and Prolog to get in trouble.

Table of Contents

* denotes a planned chapter.

Part I: Learning C#

  1. .NET Framework
  2. Visual Studio
  3. Fundamentals of C#
  4. Declaring Types in C#
  5. Collections
  6. LINQ

Part II: Programming Board Games

  1. Board Game Design
  2. Programming Othello
  3. Testing Othello
  4. Programming Chess
  5. Testing Chess

Part III: Visual Board Games and Graphical User Interfaces

  1. User Interfaces With WPF
  2. Visual Board Game Design
  3. Visual Othello
  4. Visual Chess

Part IV: Artificial Intelligence

  1. AI Opponents and the Minimax Algorithm*
  2. Integrating AI into Applications*
  3. Profiling Chess*
  4. 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 $13 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

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub