mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 15:20:52 +01:00
Fix NoSuchElementException in Room cycle
This commit is contained in:
parent
b198d731c5
commit
540d401838
@ -173,6 +173,8 @@ public class RoomUnit {
|
|||||||
|
|
||||||
Deque<RoomTile> peekPath = room.getLayout().findPath(this.currentLocation, this.path.peek(), this.goalLocation, this);
|
Deque<RoomTile> peekPath = room.getLayout().findPath(this.currentLocation, this.path.peek(), this.goalLocation, this);
|
||||||
if (peekPath.size() >= 3) {
|
if (peekPath.size() >= 3) {
|
||||||
|
if (path.isEmpty()) return true;
|
||||||
|
|
||||||
path.pop();
|
path.pop();
|
||||||
//peekPath.pop(); //Start
|
//peekPath.pop(); //Start
|
||||||
peekPath.removeLast(); //End
|
peekPath.removeLast(); //End
|
||||||
|
Loading…
Reference in New Issue
Block a user