public int getFrameIdByCoords(int x, int y) {
    	for (int i = 0; i < this.mapFrames.length; i++) {
    		for (int j = 0; j < this.mapFrames[i].length; j++) {
    			if (this.mapFrames[i][j].getX() == x && this.mapFrames[i][j].getY() == y) {
    				return this.mapFrames[i][j].getId();
    			}
    		}
    	}
    	
    	return -1;
    }