public void moveOnX(int xMoveSize) { 

        int casePositionX = 0, casePositionYup = 0, casePositionYdown = 0;
        int caseSize = GameVue.getCaseSize();
        
        switch(xMoveSize) {
            case 10 :
                casePositionX = (player.getxPosition() + caseSize + xMoveSize - 1) / caseSize;
                casePositionYup = player.getyPosition() / caseSize;
                casePositionYdown = (player.getyPosition() + caseSize - 1) / caseSize;               
                
                if(map.isFree(casePositionX, casePositionYup) && map.isFree(casePositionX, casePositionYdown)) {
                    player.moveOnX(xMoveSize);
                }
                  
                break;
                
            case -10 :
                casePositionX = (player.getxPosition() + xMoveSize) / caseSize;
                casePositionYup = (player.getyPosition() / caseSize);
                casePositionYdown = (player.getyPosition() + caseSize - 1) / caseSize;
                
                if(map.isFree(casePositionX, casePositionYup) && map.isFree(casePositionX, casePositionYdown) && (player.getxPosition() + xMoveSize) >= 0) {
                    player.moveOnX(xMoveSize);
                }
                
                break;
        }     
    }