@Override
    public void mouseReleased(MouseEvent e) 
    {
        switch(e.getButton())
        {
            case MouseEvent.BUTTON1: //Left click
                //System.out.println("X: " + cX + ", Y: " + cY + "\t");
                selected = Game.map.getUnit(pX, pY);
                if(Game.gui.canSelect(selected))
                {
                    walkList = new ArrayList<>(Game.paths.getWalk());
                    Game.paths.clearPaths();
                    //if(Game.inGrid(cX, cY)) Shouldn't need this check, move function already performs check
                    //System.out.println("Moving unit");
                    selected.move(cX, cY, walkList);
                }
                canPath = false;
                Game.gui.update(selected);
                Game.gui.update(e.getX(), e.getY(), false, 1);
                //System.out.println("released left");
                break;
                
            case MouseEvent.BUTTON2: //Middle click
                Game.gui.update(e.getX(), e.getY(), false, 2);
                //System.out.println("released middle");
                break;
                
            case MouseEvent.BUTTON3: //Right click
                Game.gui.update(e.getX(), e.getY(), false, 3);
                //System.out.println("released right");
                break;
        }
    }