@Override
	public ServerModel buildCity(BuildCityRequest request, CookieParams cookie) throws InvalidMovesRequest, ClientModelException {
		if(request == null) {
			throw new InvalidMovesRequest("Error: invalid build city request");
		} 
		
		ServerModel serverGameModel = serverModels.get(cookie.getGameID());
		
		//execute
		int playerIndex = request.getPlayerIndex();
		Player player = serverGameModel.getPlayers().get(playerIndex);
		int x = request.getCityLocation().getX();
		int y = request.getCityLocation().getY(); 
		String direction = request.getCityLocation().getDirectionStr();
		City city = new City(playerIndex, x, y , direction);
		serverGameModel.getMap().getCities().add(city);
		serverGameModel.incrementVersion();
		
		ArrayList<Settlement> settlements = serverGameModel.getMap().getSettlements();
		
		for (int i = 0; i < settlements.size(); i++) {
			VertexLocation loc = settlements.get(i).getLocation().getNormalizedLocation();
			if (settlements.get(i).getLocation().getHexLoc().getX() == x &&
					settlements.get(i).getLocation().getHexLoc().getY() == y &&
					settlements.get(i).getLocation().getDir().getDirectionStr().equals(direction)) {
				settlements.remove(i);
				break;
			}
			
			if (loc.getHexLoc().getX() == x &&
					loc.getHexLoc().getY() == y &&
					loc.getDir().getDirectionStr().equals(direction)) {
				settlements.remove(i);
				break;
			}
				
		}
		
		player.decrementCities();
		player.incrementVictoryPoints();
		player.incrementSettlements();
		//3 ore 2wheat
		int newOre = player.getResources().getOre() - 3;
		int newWheat = player.getResources().getWheat() - 2;
		player.getResources().setOre(newOre);
		player.getResources().setWheat(newWheat);
		serverGameModel.getBank().ore += 3;
		serverGameModel.getBank().wheat += 2;
		
		checkForWinner(serverGameModel,playerIndex);
		
		return serverGameModel;
	}