import { BinaryClassSerializationAdapter } from "../../storage/binary/BinaryClassSerializationAdapter.js";
import { FogOfWarRevealer } from "../FogOfWarRevealer.js";

export class FogOfWarRevealerSerializationAdapter extends BinaryClassSerializationAdapter {

    klass = FogOfWarRevealer;
    version = 0;

    /**
     *
     * @param {BinaryBuffer} buffer
     * @param {FogOfWarRevealer} value
     */
    serialize(buffer, value) {
        value.radius.toBinaryBuffer(buffer);
    }

    /**
     *
     * @param {BinaryBuffer} buffer
     * @param {FogOfWarRevealer} value
     */
    deserialize(buffer, value) {
        value.radius.fromBinaryBuffer(buffer);
    }
}
