package web.servlets;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.scotlandyard.engine.GameException;
import org.scotlandyard.engine.json.JsonContainerAdapter;
import org.scotlandyard.impl.engine.GameEngine;
/**
* TODO add a description for this class
*
*
* @author Hussain Al-Mutawa
* @version 2.0
* @since Sun Sep 23, 2011
*/
public class ResetGameEngine extends AbstractServlet implements IRequestProcessor{
//TODO add documentation about the action performed by getting the output of this servlet
@Override
public Object getOutput(
final HttpServletRequest request,
final GameEngine engine) throws GameException {
engine.clearRecords();
return (new JsonContainerAdapter("The engine has been reset").toJson());
}
@Override
public void validateRequest(
final HttpServletRequest request,
final GameEngine engine) throws GameException {
}
}