public Purchase makePurchase(int id_user, int cost, String type, int id) throws DataBaseConnectorException {
        Purchase purchase = new Purchase();
        try {
            if(type == null){
                throw new DataBaseConnectorException("Shopping error ^_^ (type == null): ");
            }else if(type.equals("$tank$")){
                purchase = addTankToGarage(id_user, id);
            }else if(type.equals("$armor$")){
                addEquipment("armor", id_user, id);
                purchase.setArmor(id);
            }else if(type.equals("$engine$")){
                addEquipment("engine", id_user, id);
                purchase.setEngine(id);
            }else if(type.equals("$first_weapon$")){
                addEquipment("first_weapon", id_user, id);
                purchase.setFirstWeapon(id);
            }else if(type.equals("$second_weapon$")){
                addEquipment("second_weapon", id_user, id);
                purchase.setSecondWeapon(id);
            } else{
                throw new DataBaseConnectorException("Shopping error ^_^ (wrong type): ");
            }

            executeUpdate("UPDATE users SET money = money - "+cost+" WHERE id_user = "+ id_user);
        }
        catch (Exception e){
            throw new DataBaseConnectorException("Shopping error ^_^ : " + e.toString());
        }
        return purchase;
    }