Chess Game Using Html CSS And JavaScript - Part 9: Play Against Stockfish

  Рет қаралды 1,068

Simple Coding Tutorials

Simple Coding Tutorials

Күн бұрын

This video, part 9 of the JavaScript Chess Series, focuses on enabling players to playchess against the Stockfish engine directly at various levels based on the engine’s depth.Watch as a JavaScript chess game is modified to allow players to challenge the Stockfish engine. This isn’t about viewing the engine’s analysis but about stepping into the game yourself. The video also showcases the implementation of chess board flipping, allowing players to play both white and black. Don’t forget to like,comment, and subscribe for more chess programming content!
Code:tinyurl.com/javascript-chess-...
Chess Pieces PNG Files:
White Pawn:By en:User:Cburnett - File:Chess plt45.svg, CC BY-SA 3.0, commons.wikimedia.org/w/index...
Black Pawn:By en:User:Cburnett - File:Chess pdt45.svg, CC BY-SA 3.0, commons.wikimedia.org/w/index...
White Knight:By en:User:Cburnett - File:Chess nlt45.svg, CC BY-SA 3.0, commons.wikimedia.org/w/index...
Black Knight:By en:User:Cburnett - File:Chess ndt45.svg, CC BY-SA 3.0, commons.wikimedia.org/w/index...
White Bishop:By en:User:Cburnett - File:Chess blt45.svg, CC BY-SA 3.0, commons.wikimedia.org/w/index...
Black Bishop:By en:User:Cburnett - File:Chess bdt45.svg, CC BY-SA 3.0, commons.wikimedia.org/w/index...
White Rook: By en:User:Cburnett - File:Chess rlt45.svg, CC BY-SA 3.0, commons.wikimedia.org/w/index...
Black Rook: By en:User:Cburnett - File:Chess rdt45.svg, CC BY-SA 3.0, commons.wikimedia.org/w/index...
White Queen:By en:User:Cburnett - File:Chess qlt45.svg, CC BY-SA 3.0, commons.wikimedia.org/w/index...
Black Queen:By en:User:Cburnett - File:Chess qdt45.svg, CC BY-SA 3.0, commons.wikimedia.org/w/index...
White King:By en:User:Cburnett - File:Chess klt45.svg, CC BY-SA 3.0, commons.wikimedia.org/w/index...
Black King:By en:User:Cburnett - File:Chess kdt45.svg, CC BY-SA 3.0, commons.wikimedia.org/w/index...
0:00 Introdunction to Chess Game Using Html CSS And JavaScript - Part 9
2:43 Adding new controls to the game.
3:51 Applying style to new elements
5:26 Implementing flip of the board and resetting the game.
8:03 Creating a function to execute a move by obtaining the initial and final squares.
10:53 Retrieving the optimal move from the engine.

Пікірлер: 19
@ademmaster6811
@ademmaster6811 3 ай бұрын
Can you upgrade the analysis system by adding back and forward moves as well as displaying the coordinates of each move made?
@SimpleCodingTutorials
@SimpleCodingTutorials 3 ай бұрын
Yes, I’m planning to add these features in my future videos.
@Tech_help01
@Tech_help01 6 күн бұрын
The stockfish is not responding cam you give the server file of local host
@SimpleCodingTutorials
@SimpleCodingTutorials 6 күн бұрын
To get the server running, you'll need to use the Live Preview extension in VS Code. This will set up a local server for you. Also the files for the project are linked in the description.
@Tech_help01
@Tech_help01 6 күн бұрын
@@SimpleCodingTutorials But there is no server file and I also have downloaded the live preview but still it doesn't move
@SimpleCodingTutorials
@SimpleCodingTutorials 5 күн бұрын
@@Tech_help01 I apologize for the confusion. I mistook this video for the multiplayer version. This one doesn't have a server file. To get it working, first install Stockfish by running: npm install stockfish Also, if you try to run the game inside VS Code, it won't work directly. After running it in VS Code, copy the address (it will be something like 127.0.0.1:3000/index.html) and paste it into a browser to see it work.
@harishsidagam
@harishsidagam 3 ай бұрын
Im running with live server but its not working means the other side that is black is not responding..
@SimpleCodingTutorials
@SimpleCodingTutorials 3 ай бұрын
Try Live Preview extension instead
@Menywow
@Menywow 3 ай бұрын
Hello, how to configure the game to the latest version of Stockfish 16.1?
@SimpleCodingTutorials
@SimpleCodingTutorials 3 ай бұрын
The latest JavaScript version of Stockfish is currently 16.0.0. You can check for any updates or newer versions on the official GitHub page here: github.com/nmrugg/stockfish.js
@Menywow
@Menywow 3 ай бұрын
@@SimpleCodingTutorials Thanks, do you plan to add a countdown timer to the code?
@SimpleCodingTutorials
@SimpleCodingTutorials 3 ай бұрын
@@Menywow Yes, I plan to add a countdown timer to the code. It will be implemented when the 2-player mode is added to the game.
@fakebent
@fakebent 2 ай бұрын
Whenever I castle, the bot doesn't make a move back.
@SimpleCodingTutorials
@SimpleCodingTutorials 2 ай бұрын
Could you provide more details about any error messages you're seeing in the console? Also, do you mind sharing the position when the problem occurs? It might help me understand what's going on. Thanks!
@harishsidagam
@harishsidagam 3 ай бұрын
The other side that is black is not responding to the white moves
@harishsidagam
@harishsidagam 3 ай бұрын
Is there any thing to add
@SimpleCodingTutorials
@SimpleCodingTutorials 3 ай бұрын
For Stockfish to work, you need to run the game on a local server. If you’re using Visual Studio Code, ‘Live Server’ can help. Start the server and open the game through localhost.
@harishsidagam
@harishsidagam 3 ай бұрын
Is their should be any file regarding stockfish
@harishsidagam
@harishsidagam 3 ай бұрын
I'm running with live server but the same problem occurs
Chess Game Using Html CSS And JavaScript - Part 10: Multiplayer Mode
21:30
Simple Coding Tutorials
Рет қаралды 101
I BEAT FABIANO CARUANA *My Best Game*
15:08
Anna Cramling
Рет қаралды 183 М.
Пробую самое сладкое вещество во Вселенной
00:41
LOVE LETTER - POPPY PLAYTIME CHAPTER 3 | GH'S ANIMATION
00:15
Incredible magic 🤯✨
00:53
America's Got Talent
Рет қаралды 67 МЛН
What if many forks were made of salt?
7:13
Ben Walker
Рет қаралды 682 М.
How to Create a Chess Engine with TensorFlow (Python)
14:59
Nick Tech
Рет қаралды 2 М.
100+ Linux Things you Need to Know
12:23
Fireship
Рет қаралды 727 М.
The End Of Jr Engineers
30:58
ThePrimeTime
Рет қаралды 316 М.
I WON!!!!!!!!!!!!!!!!!!!!
31:29
GothamChess
Рет қаралды 536 М.
Oxford University Mathematician REACTS to "Animation vs. Geometry"
31:06
Tom Rocks Maths
Рет қаралды 133 М.
How One Change Rescued my Indie Game!
11:05
BenBonk
Рет қаралды 8 М.
James Webb Telescope INSANE New Discovery Before The Big Bang
14:59
Cosmos Chronicles
Рет қаралды 650