Removes NPE from Tile(Tile) constructor.
@@ -57,14 +57,16 @@ public class Tile {
*
* @param otherTile
* The tile.
- *
- * @throws NullPointerException
- * If the otherTile is null.
*/
- public Tile(final @NonNull Tile otherTile) {
+ public Tile(final Tile otherTile) {
reset();
+
+ if (otherTile == null) {
+ this.character = ' ';
+ } else {
copy(otherTile);
}
+ }
/** Resets the tile to it's default state. */
public void reset() {
