filmov
tv
Programming a Chess Game in C# | Part 8 - Detect Check & Legal Moves
![preview_player](https://i.ytimg.com/vi/eVL1dCioIVc/maxresdefault.jpg)
Показать описание
Learn how to program a Chess game in C#!
Welcome to part 8 of my C# Chess tutorial.
Have you noticed that our game sometimes generates moves that are illegal? That's because it's never allowed to make any move that leaves your king in check.
In this part, we write code that can detect if a player is in check or not
and use it to filter out all illegal moves. Next time, we'll also use the check detection code to handle checkmate and stalemate as well!
Assets:
Source code is available here:
Chapters:
0:00 - Illegal Moves?
0:19 - Examples
1:55 - Plan
2:28 - CanCaptureOpponentKing
4:09 - Override For Pawn
5:27 - Override For King
6:45 - Detect Check
10:06 - Copy The Board
11:57 - Legal Move Algorithm
14:01 - Removing Illegal Moves
15:00 - Success!
Welcome to part 8 of my C# Chess tutorial.
Have you noticed that our game sometimes generates moves that are illegal? That's because it's never allowed to make any move that leaves your king in check.
In this part, we write code that can detect if a player is in check or not
and use it to filter out all illegal moves. Next time, we'll also use the check detection code to handle checkmate and stalemate as well!
Assets:
Source code is available here:
Chapters:
0:00 - Illegal Moves?
0:19 - Examples
1:55 - Plan
2:28 - CanCaptureOpponentKing
4:09 - Override For Pawn
5:27 - Override For King
6:45 - Detect Check
10:06 - Copy The Board
11:57 - Legal Move Algorithm
14:01 - Removing Illegal Moves
15:00 - Success!
The Fascinating Programming of a Chess Engine
Coding Adventure: Chess
Let's make 16 games in C++: Chess
Chess game in python 🤩 || coding status || #shorts
Can THIS win Sebastian Lague's Chess challenge?
Coding a Complete Chess Game AI With Python (Part 1) | PVP Game Mode
Code Chess in JavaScript with me! 😱
Making The World's Best Chess Engine
How to get a brilliant move every game
CHESS! // Code Review
Code a Chess Game with Stockfish API – JavaScript Tutorial
ASMR Programming - Chess Game Coding (VS Computer) - No Talking
How to Code Chess in Java
I coded a FREE Chess Game Review website.
♟️ Code CHESS in JavaScript (Super simple!)
How I Coded a Python Chess Program From Scratch in Under Two Weeks
I made multiplayer chess game with 90 lines of backend code [ReactJS + UrTurn]
The Worst Chess Game Mathematically Possible
I Built a No-Code Chess Game in 10 Mins (Cursor AI)
Coding Adventure: building a strong Chess AI | Can it beat me?
11 year TRICKS Magnus Carlsen? 😱 #magnuscarlsen #chess
Chess in Visual Studio C++, C, Python
Programming a Chess Game in C# | Part 8 - Detect Check & Legal Moves
World's COOLEST Chess Set!....
Комментарии