Learn how to program a Chess game in C#!
Welcome to part 7 of my C# Chess tutorial.
In this part we make the ChessUI project handle moves correctly.
We write code which enables players to choose one of their pieces and move it to another square!
To make it clear which players turn it is, we also add two custom cursors to the game.
Assets:
https://ottobotcode.com/chess/ChessAs...
Source code is available here:
/ 78701
Chapters:
0:00 - Plan
0:14 - End Result
0:48 - Add Highlight Grid
3:16 - Move Selection Details
4:07 - Create Highlights
5:10 - Cache Moves
6:03 - Show Highlights
7:13 - Hide Highlights
8:05 - Handle User Input
8:38 - Detect Clicked Square
10:37 - Respond To Click
11:16 - Selecting A Piece
12:39 - Moving A Piece
14:08 - Does It Work?
14:33 - Custom Cursors
15:14 - Load Cursors
17:39 - Change Cursor
19:02 - Success!