Write a chess game using bit-fields and masks

Posted by bob on Aug 23, 2021 9:57 PM EDT
Opensource.com; By Jim Hall
Mail this story
Print this story

Let's say you were writing a chess game in C. One way to track the pieces on the board is by defining a structure that defines each possible piece on the board, and its color, so every square contains an element from that structure.

Full Story

  Nav
» Read more about: Story Type: News Story, Tutorial; Groups: Developer, Linux

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.