package com.pm.server.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/pacman")
public class PacmanController implements PlayerController {

	

}

@@ -39,233 +39,1652 @@
 ort 
-org.springframework.web.bind.annotation.RequestMapping;%0Aimport org.springframework.web.bind.annotation.RestController;%0A%0A@RestController%0A@RequestMapping(%22/pacman%22)%0Apublic class PacmanController implements PlayerController %7B%0A%0A%09
+javax.servlet.http.HttpServletResponse;%0A%0Aimport org.apache.logging.log4j.LogManager;%0Aimport org.apache.logging.log4j.Logger;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.web.bind.annotation.PathVariable;%0Aimport org.springframework.web.bind.annotation.RequestMapping;%0Aimport org.springframework.web.bind.annotation.RequestMethod;%0Aimport org.springframework.web.bind.annotation.RestController;%0A%0Aimport com.pm.server.datatype.CoordinateImpl;%0Aimport com.pm.server.player.Pacman;%0Aimport com.pm.server.player.PacmanImpl;%0Aimport com.pm.server.player.PacmanRepository;%0A%0A@RestController%0A@RequestMapping(%22/pacman%22)%0Apublic class PacmanController implements PlayerController %7B%0A%0A%09@Autowired%0A%09private PacmanRepository pacmanRepository;%0A%0A%09private final static Logger log =%0A%09%09%09LogManager.getLogger(PacmanController.class.getName());%0A%0A%09@RequestMapping(%0A%09%09%09value = %22/%7Blatitude%7D/%7Blongitude%7D%22,%0A%09%09%09method = RequestMethod.POST%0A%09)%0A%09public void createPacman(%0A%09%09%09@PathVariable double latitude,%0A%09%09%09@PathVariable double longitude,%0A%09%09%09HttpServletResponse response) %7B%0A%0A%09%09log.debug(%22Mapped /pacman/%7B%7D/%7B%7D%22, latitude, longitude);%0A%0A%09%09if(pacmanRepository.getPlayer() != null) %7B%0A%09%09%09log.debug(%22A Pacman already exists.%22);%0A%09%09%09response.setStatus(HttpServletResponse.SC_CONFLICT);%0A%09%09%09return;%0A%09%09%7D%0A%0A%09%09Pacman pacman = new PacmanImpl();%0A%09%09pacman.setLocation(new CoordinateImpl(latitude, longitude));%0A%0A%09%09try %7B%0A%09%09%09pacmanRepository.addPlayer(pacman);%0A%09%09%7D%0A%09%09catch(Exception e) %7B%0A%09%09%09log.debug(e.getMessage());%0A%09%09%09response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);%0A%09%09%09return;%0A%09%09%7D%0A%0A%09%09response.setStatus(HttpServletResponse.SC_OK);%0A%0A%09%7D
 %0A%0A%7D%0A

Implement POST /pacman/latitude/longitude