public void update(Player p){
		int px = p.getPosition().getX();
		int py = p.getPosition().getY();
		if(p.getPosition().equals(WIN_POSITION)){
			Game.win();
			return;
		}
		if(mapMatrix[px][py] == VISITEDCODE){
			if(p.getState()!=Player.INVALIDSTATE){
				p.updateState(Player.DEADSTATE);
				mapMatrix[px][py] = DEADCODE;
			}
		}
		else if(mapMatrix[px][py] == UNVISITEDCODE){
			mapMatrix[px][py] = VISITEDCODE;
		}
		else if(mapMatrix[px][py] == UNVISITABLECODE){
			//p.move(Direction.getOppositeDirection(p.getDirection()));
			System.out.println("You cannot visit that square!");
			p.updateState(Player.INVALIDSTATE);
		}
	}