Java Chess Programming Video #41 En Passant Preperation

preview_player
Показать описание

Chess Code Repository :

IDE:

Reading Material:
Рекомендации по теме
Комментарии
Автор

Hey Amir, really enjoying this series. I've learned a lot about how to get started with a project and how to code quicker using the IDE to help me generate methods and member fields and stuff with quick fixes. In my opinion you should'nt be too concerned about the "boringness" of your videos, to me they are always intereseting. In this case especially, it took some time, but we cleaned up the move class for good, which should be motivation enough for anyone that is interested in programming. Anyhow your videos are always well structured and you give insight into your thaughts, which always makes them intereseting. Keep up the good work <3

DerMitDemWolfTanzt.
Автор

Congratulations!
Great job!
When is the next video? I'm looking forward to watch!
Thank you for all and great job!

brunomaam
Автор

I found a bug in the MoveFactory class, in my code at least, the function createMove in the first move you getAllLegalMoves from the board and that includes black legal moves and for some reason that had a wierd effect if it was white players turn and you moved a Black Pawn it would copy itself in the destination and not move the original (+1 Piece) and give the turn to black player.

This change seems to solve the problem

public static Move createMove(Board b, int currentCoordinate, int destinationCoordinate){
for(Move move :
== currentCoordinate &&
== destinationCoordinate){


return move;
}
}
return NULL_MOVE;
}

Meneltour
Автор

Hello Amir, I don't know why my comment was deleted. I just wanna say that I changed the builder.setPiece(movedPiece) to builder.setPiece(movedPawn) as you said, and it works. Very thanks for your nice!! But another problem is that the piece cannot attack. The below is the error shown when I try to move any piece to attack another:
Exception in thread "AWT-EventQueue-0"
Exception in thread "AWT-EventQueue-0"
at
at
Is this problem possible up to now?

wangkaili
Автор

Hello, at 9:27 you have an error when you pick up a piece. javax.imageio.IIOException: Can't read input file!
at Source)

at

at
I have the same error how can I fix it? Thanks!

alexdumitrana
Автор

Hello Amir,
I have problem with black pieces. Everything is working except them. Highlighted moves are shown but when I click they don’t move. Any suggestions? Where to put debugger breakpoint?

igorstevanovic
Автор

Amir, what patterns are there except Builder?

datvu
Автор

First off i have to say thank you so much for the tutorials. Been working on it for over a month and slowly near the end. I have stumbled across errors but with ur teaching have solved them. There's one error which i can't solve and that is my pawns arent taking each other. Each Piece is taking each other except for my pawn.
Here is my GitHub

sadshonenkid
Автор

Hey Amir, first of all thank you so much for your videos!
But I have a problem with the En passant move, it doesn't work and I can't find the bug can you help me?
Here's the link to the code :
Thank you so much anyway.

destinyluck