Skip to content

Commit

Permalink
Fixed clone bug
Browse files Browse the repository at this point in the history
  • Loading branch information
antionio committed Nov 30, 2013
1 parent b398959 commit 55585f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -345,12 +345,8 @@ public static PieceTemplate getRandomPieceTemplate() {
}

public static RoomTemplate getRandomRoomTemplate() {
try {
return roomTemplates.get(MathUtils.random(roomTemplates.size - 1))
.clone();
} catch (CloneNotSupportedException e) {
return null;
}
return roomTemplates.get(MathUtils.random(roomTemplates.size - 1))
.clone();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ public RoomTemplate(Pixmap pixmap) {
}
}

@Override
public RoomTemplate clone() throws CloneNotSupportedException {
public RoomTemplate clone() {
RoomTemplate template = new RoomTemplate(pixmap);
return template;
}
Expand Down

0 comments on commit 55585f7

Please sign in to comment.