Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Python Game Programming By Example

You're reading from   Python Game Programming By Example A pragmatic guide for developing your own games with Python

Arrow left icon
Product type Paperback
Published in Sep 2015
Publisher
ISBN-13 9781785281532
Length 230 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Planning the Checkers application


Let's give further thought to the real-world scene that our Checkers program will expect and the virtual scene it will create. Consider the following close-up photograph, showing part of an 8 x 8 checkerboard. From the top-left corner to right-hand side, we see a light king, a light pawn, a dark pawn, and a dark king.

This checkerboard is just a sheet of matte paper on which black and white squares are printed (the paper is glued to a foam board to make it rigid). The playing pieces happen to be poker chips—red chips for the dark side and gray chips for the light side. A stack of two poker chips is a pawn, while a stack of four is a king. As this example suggests, people may play checkers with homemade or improvised sets. There is no guarantee that two checkers sets will look alike, so we will try to avoid rigid assumptions about the color scheme. However, high contrast is generally helpful in computer vision, and this example is ideal because it uses four...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime