Java Chess Programming Video #35 The GUI (Part VII)

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

Chess Code Repository :

IDE:

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

Making a "Pawn Jump", "More than one space move with "Bishop", "Rook", or "Queen"", and Some King Move creates NullPointerException.


kevgaming
Автор

Congratulations on the great development of the game of chess. I need to thank you for the knowledge that you taught me in this series until here. Greetings from Brazil and wish you much success!

felipekoetz
Автор

I keep getting "Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError"
at
at
at
This error it shows up when i try to move a piece and I don't understand why because I followed all of your steps. Can you healp me please ?

Cristian-suns
Автор

Hi Aamir, thanks for the great tutorial, my pawn couldn't do the jump move, it can move only one step, I figured out we didn't handle the isFirstMove() method yet, that is the first condition for allowing the pawn to jump,
Is that right or I missed something

Thanks again!

nik
Автор

+Amir Afghani, I'm a few tutorials ahead of you. I can get my TilePanels to change colour and show the available moves for the selected piece. I can move and take pieces black and white and do pawn jumps, i did have a few issues but II'm getting more familiar with the coding. waiting for you to show castle moves and en passant. cant get my head around how you know its first move for king and rook because they could get moved back to the same square. Pawns jumps are easy, just say that if the pawn is on the second row return first move true.

but it was truly amazing to just see the 'basics' working. compared to other tutorials on youtube i can tell you have a complete understanding of java with the way you are guiding us towards database management and performance with immutable objects and hashcodes and how we will be looking up database board positions in the future. A massively important part of a good engine.

I know its not part of the tutorial but dragging is aesthetically pleasing and a skill i'm still trying to learn. I can use mouse drag to execute moves, without dragging the image. But I run into a world of pain trying to drag JPanels. Either I'm taking the whole TilePanel with icon image with all 64 TilePanels at different depths, or i can drag a piece without executing the moves. Still a bit convoluted trying to merge these concepts but I'm making progress. I think i should be able to get it in a few more days.

cant wait for more tutorials. if you do one a week this could go on for another 2 years i reckon. I dont mind if you make the tutorials a bit longer.

I think the thing I'm most looking forward to is when you click and load the 1 million games for the engine to sort through. That will blow my mind. And just generally when you start explaining the database lookups.

Please keep turning out great tutorials.

Awesome work. I'll buy you beer if you ever in Edinburgh.

iansweeney
Автор

Hey. I'm having trouble moving more than just one piece (moving the black piece).

It gives the exception in the Move class. "Cannot execute the null move!"

I don't really understand what could be wrong here, what do you think could be the problem? or will you need to look through the code?

BlackwidowGG
Автор

how are you able to run your Table class when there is no main method implemented run button in my pc is greyed out...I can't run the code from the Table class. I have to run it from the JChess class.

ngangamhaolai
Автор

hello! its been a while since you made this, but I was wondering if you could give any pointers on using a command line interface over a GUI?

boopy
Автор

Great classes!
Amazing Chess Game!
Do you know when is the chess game is going done.
I wanna see the game ready to play. How I said, this is an Amazing job that you're doing.
Congratulations!

brunomaam
Автор

I spent over an hour trying to figure out why the heck all my white pieces would vanish after making my first move... Turns out that i was returning the blackPieces in getWhitePieces method lol. Awesome work btw, I find the GUI interaction particularly useful, for the next projects that I have in mind.

Pspet
Автор

Not sure why my comments keep getting deleted, but whenever I attempt to make a move I receive a NullPointerException. It seems that chessBoard is always null when passed into assignTilePieceIcon() even though it's initialized in the Tile constructor using createNewBoard() from the Board class. Any help?

alr
Автор

Thank you for this series. I have a problem with the chess engine code. I run into a Null Pointer Exception on the line that reads: final MoveTransition Transition =

I set up a breakpoint at that line and it came back saying that there is a null under the mouseevent e (bdata = null). None of my pieces move. I followed your video quite closely :/ Can you tell me where my errors are?

ewuzz
Автор

hello, Amir i am having aproblem with my code, when i run it, none of my pieces move..it has really been a headbreaker need help please

udeleodiri
Автор

Just out of curiosity, why are we making a movetransition class? Couldn't we have returned a boolean from makeMove method of the player class where return is true if move is possible or false if not?
In the latter case we would not need movetransition class as well as the moveStatus enum.

insane
Автор

Hello, Amir, the videos are so well structured and explained, that I can watch them in one breath. Thank you so much for the work you've done and videos you've made for us, but while implementing gui, i have a question: is it possible to make the piece move from a sourceTile to destinationTile like an animation? What i mean is the piece moves smoothly and the user is able to see that. If it's possible, can i ask you to give a little hint how to do that? Don't know how to implement that as we have an immutable board. (Sorry for my english) So much respect for you)

slaviklogvinov
Автор

My pieces arent moving can someone help me please?

TheWreckerOG
Автор

Hi, I thought all was good, but when I run my program, the first white pawn moves forward one square regardless of which piece I try to move. No clue where in my code this happens, any help greatly appreciated.

harryabad
Автор

Hey, I can move my pawns diagonally after running the code without capturing an enemy, is this fixed in future videos or did I make a mistake?

goldfan
Автор

Hey, i've got a bug in my code that's duping my pieces and for some reason when I post my github repo here it deletes the comments. Any help?

loldirt
Автор

Hi i was wondering how you made your pawns move. i have every piece moving except my pawns. REALLY need your help asap. also i enjoy the tutorials they are really usefull.

idkidk
visit shbcf.ru