Bug 700

Summary: When you try kill a piece with the same color, it throws 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/4999a0f52f039271012b978d598aef788a938bc9

Description sskawle2-c 2022-11-06 13:26:23 HKT
Steps to Reproduce:
1.	Execute App.java
2.	Kill a piece with the same color

Expected Results: 
Move should be invalid and ignored.

Actual Results:
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:39:22 HKT
Add an if statement to check if the piece being eaten has the same colour as the eater in
`public boolean makeMove(Point start, Point end)` in Game.java.
https://github.com/glennsalter/cs3343-chess/commit/4999a0f52f039271012b978d598aef788a938bc9.
Comment 2 sskawle2-c 2022-11-24 21:58:37 HKT
(In reply to Assan Kozhin from comment #1)
> Add an if statement to check if the piece being eaten has the same colour as
> the eater in
> `public boolean makeMove(Point start, Point end)` in Game.java.
> https://github.com/glennsalter/cs3343-chess/commit/
> 4999a0f52f039271012b978d598aef788a938bc9.

The new link to the commit: https://github.com/glennsalter/cs3343-chess/commit/4999a0f52f039271012b978d598aef788a938bc9