Skip to content

Instantly share code, notes, and snippets.

@pauldwhitman
Created March 10, 2013 10:51
Show Gist options
  • Select an option

  • Save pauldwhitman/5128113 to your computer and use it in GitHub Desktop.

Select an option

Save pauldwhitman/5128113 to your computer and use it in GitHub Desktop.
Part of the "Chess in C" blog post series. Code to place one side worth of chess pieces on the board.
/* Set initial start positions */
board[0][0] = ROOK;
board[0][1] = KNIGHT;
board[0][2] = BISHOP;
board[0][3] = QUEEN;
board[0][4] = KING;
board[0][5] = BISHOP;
board[0][6] = KNIGHT;
board[0][7] = ROOK;
board[1][0] = PAWN;
board[1][1] = PAWN;
board[1][2] = PAWN;
board[1][3] = PAWN;
board[1][4] = PAWN;
board[1][5] = PAWN;
board[1][6] = PAWN;
board[1][7] = PAWN;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment