@FXML
    public void onBuySellButtonPress( ActionEvent event ){
        
        String s = event.getSource().toString(); //example output: "Button[id=buyWaterButton, styleClass=button]" // usin this is bad, sorry, -Sid
        int unitCost = 0, quantity = 0;
        
        Resource resource = null;
        switch (s){
            case "Button[id=buyWaterButton, styleClass=button]'Trade'":
                quantity = BSMultiplier* Integer.parseInt(buyWaterAmount.getText());
                unitCost = Marketplace.getPrice(Resource.WATER);
                resource = Resource.WATER;
                break;
            case "Button[id=buyFurButton, styleClass=button]'Trade'":
                quantity = BSMultiplier* Integer.parseInt(buyFurAmount.getText());
                unitCost = Marketplace.getPrice(Resource.FUR);
                resource = Resource.FUR;
                break;
            case "Button[id=buyFoodButton, styleClass=button]'Trade'":
                quantity = BSMultiplier* Integer.parseInt(buyFoodAmount.getText());
                unitCost = Marketplace.getPrice(Resource.FOOD);
                resource = Resource.FOOD;
                break;
            case "Button[id=buyOreButton, styleClass=button]'Trade'":
                quantity = BSMultiplier* Integer.parseInt(buyOreAmount.getText());
                unitCost = Marketplace.getPrice(Resource.ORE);
                resource = Resource.ORE;
                break;
            case "Button[id=buyGamesButton, styleClass=button]'Trade'":
                quantity = BSMultiplier* Integer.parseInt(buyGamesAmount.getText());
                unitCost = Marketplace.getPrice(Resource.GAMES);
                resource = Resource.GAMES;
                break;
            case "Button[id=buyFirearmsButton, styleClass=button]'Trade'":
                quantity = BSMultiplier* Integer.parseInt(buyFirearmsAmount.getText());
                unitCost = Marketplace.getPrice(Resource.FIREARMS);
                resource = Resource.FIREARMS;
                break;
            //MODEL THE OTHER RESOURCES AFTER THE FOLLOWING
            /*
            case "Button[id=robotTransaction, styleClass=button]'BUY'":
                quantity = BSMultiplier* Integer.parseInt(robotQuantity.getText());
                unitCost = Marketplace.getPrice(Resource.ROBOTS);
                resource = Resource.ROBOTS;
                break;
            default:
                System.out.println("Nothing bought/sold.");
                */
        }
        if(  quantity*unitCost <= player.getCredits() ){
            // update cargospace, marketplace counts, player credits, and more!
            try {
                player.getShip().cargo.changeInventory(resource, quantity);
                    player.addCredits(-(quantity*unitCost));
            } catch (Error e) {
                System.out.println(e.getMessage());
            }

            System.out.println(player.getShip().cargo);
        } else{
            System.out.println( "YOU DON'T HAVE ENOUGH CREDITS! :( ");
        }
        System.out.println( "credits left: " + player.getCredits() );
        System.out.println( "quantity: " + quantity + " unitcost: " + unitCost);
    }