| Summary: | When you move a piece to its own location, it throws an exception | ||
|---|---|---|---|
| Product: | Chess Game - Group 24 | Reporter: | sskawle2-c |
| Component: | Chess | Assignee: | 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
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. |