Class SolveMazeStrategy

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

public class SolveMazeStrategy extends Object implements IServerStrategy
Server strategy: receives a Maze, returns a Solution. Consults SolutionCache first — if this exact maze was solved earlier (same bytes → same SHA-256), the stored Solution is returned directly and the search algorithm is not invoked.

Wire protocol (symmetric Object streams on both sides):

   client ─[ObjectOutputStream]─ Maze     ─→ server
   client ←─────── Solution ─── server
 

A new searcher is created per request (cheap, and avoids the stale-state pitfalls discussed in ASearchingAlgorithm).