Bug 699

Summary: When you move a piece to its own location, it throws an exception
Product: Chess Game - Group 24 Reporter: sskawle2-c
Component: ChessAssignee: Assan Kozhin <akozhin2-c>
Status: RESOLVED FIXED    
Severity: normal CC: gsalter2-c, sskawle2-c
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
URL: https://github.com/glennsalter/cs3343-chess/commit/be2db72f47c73a648f9232501ee16a63a0792093

Description sskawle2-c 2022-11-06 13:23:27 HKT
Steps to Reproduce:
1.	Execute App.java
2.	Move a piece to its current location

Expected Results: 
The move is illegal, and ignored.

Actual Result :
Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError
	at chess.chess.Move.setKilledPiece(Move.java:21)
Comment 1 Assan Kozhin 2022-11-19 16:41:33 HKT
The bug was related to the fact that when we release the mouse, the piece tries to move to the same location it is currently at. It tries to it itself and it raises Exception. Solved by checking current and next point of the move `public boolean makeMove(Point start, Point end)` in Game.java.