How to Code Chess in Java

Channel:
Subscribers:
23,000
Published on ● Video Link: https://www.youtube.com/watch?v=jzCxywhTAUI



Category:
Tutorial
Duration: 2:16:45
13,786 views
547


I coded chess in Java and this is how I did it.

It looked simple enough but boy, it was much more complicated than I thought! I was surprised at how much you can learn by coding this little old game.

You can download the chess piece images in the video from here:
https://ryisnow.itch.io/pixel-art-chess-piece-images

About Game Loop:
https://youtu.be/VpH33Uw-_0E

Thanks for watching!

Timestamps:
0:00:00 Introduction
0:01:08 Window
0:04:03 Game Loop
0:07:15 Drawing the Chessboard
0:12:17 Drawing Pieces
0:24:36 Moving Pieces
0:37:20 Setting Each Piece's Movement Rules
0:38:04 King
0:54:06 Knight
0:56:15 Rook
1:03:00 Bishop
1:08:35 Queen
1:10:52 Pawn
1:17:18 Changing Turns
1:20:43 Castling
1:29:28 En Passant
1:36:36 Promotion
1:44:51 Illegal Movement
1:48:28 Detecting Check
1:53:50 Another Illegal Movement
1:55:58 Detecting Checkmate
2:12:03 Detecting Stalemate

#gamedev #javatutorial #programming







Tags:
coding
boardgame
puzzle
simple
strategy
turnbase
swing
awt
gui
mouseadapter
mouselistener
engine
howtomakechess
yt:cc=on