Class GenerateMazeStrategy

java.lang.Object
mazealgo.model.server.GenerateMazeStrategy
All Implemented Interfaces:
IServerStrategy

public class GenerateMazeStrategy extends Object implements IServerStrategy
Server strategy: receives requested maze dimensions as int[] {rows, columns}, generates a maze with MyMazeGenerator, and returns it as a compressed byte array.

Wire protocol:

   client ─[ObjectOutputStream]─ int[] dims          ─→ server
   client ←─────── byte[] (RLE-compressed maze) ─── server
 
Compression uses MyCompressorOutputStream; the client decodes via MyDecompressorInputStream and feeds the bytes into the Maze(byte[]) constructor.