feature/cleanup #2
5 changed files with 17 additions and 5 deletions
|
@ -2,7 +2,11 @@ package ch.fritteli.labyrinth.generator.model;
|
|||
|
||||
import io.vavr.collection.Stream;
|
||||
import io.vavr.control.Option;
|
||||
import lombok.*;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.FieldDefaults;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
|
|
@ -5,7 +5,11 @@ import lombok.EqualsAndHashCode;
|
|||
import lombok.NonNull;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.SortedSet;
|
||||
import java.util.TreeSet;
|
||||
|
||||
@EqualsAndHashCode
|
||||
@ToString
|
||||
|
|
|
@ -6,7 +6,9 @@ import lombok.NonNull;
|
|||
|
||||
import java.io.ByteArrayInputStream;
|
||||
|
||||
import static ch.fritteli.labyrinth.generator.serialization.SerializerDeserializer.*;
|
||||
import static ch.fritteli.labyrinth.generator.serialization.SerializerDeserializer.MAGIC_BYTE_1;
|
||||
import static ch.fritteli.labyrinth.generator.serialization.SerializerDeserializer.MAGIC_BYTE_2;
|
||||
import static ch.fritteli.labyrinth.generator.serialization.SerializerDeserializer.VERSION_BYTE;
|
||||
|
||||
public class LabyrinthInputStream extends ByteArrayInputStream {
|
||||
public LabyrinthInputStream(@NonNull final byte[] buf) {
|
||||
|
|
|
@ -6,7 +6,9 @@ import lombok.NonNull;
|
|||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
|
||||
import static ch.fritteli.labyrinth.generator.serialization.SerializerDeserializer.*;
|
||||
import static ch.fritteli.labyrinth.generator.serialization.SerializerDeserializer.MAGIC_BYTE_1;
|
||||
import static ch.fritteli.labyrinth.generator.serialization.SerializerDeserializer.MAGIC_BYTE_2;
|
||||
import static ch.fritteli.labyrinth.generator.serialization.SerializerDeserializer.VERSION_BYTE;
|
||||
|
||||
public class LabyrinthOutputStream extends ByteArrayOutputStream {
|
||||
public void writeHeader() {
|
||||
|
|
|
@ -128,7 +128,7 @@ public class SerializerDeserializer {
|
|||
}
|
||||
|
||||
@NonNull
|
||||
Tile getTileForBitmask(final byte bitmask) {
|
||||
Tile getTileForBitmask(final byte bitmask) {
|
||||
final EnumSet<Direction> walls = EnumSet.noneOf(Direction.class);
|
||||
if ((bitmask & TOP_BIT) == TOP_BIT) {
|
||||
walls.add(Direction.TOP);
|
||||
|
|
Loading…
Reference in a new issue