public void accessSpace(int space,int buttonType){
        //LEFT CLICK:
        if(buttonType==1){
            /*if(Screen.mouseCommand == 6){
            //decide wich ones can be built:
                if(canBeBuilt(items.get(space).type)){
                    Screen.menuItemToBuild = space;
                    System.out.println("Gana build a "+items.get(space).type);
                }
            }**/
        }
        //RIGHT CLICK:
        if(buttonType==3){
            System.out.println(space);
            if(!queue.type.equals(items.get(space).type)){
                switchAnItemWithQueue(space);
            }
            else{
                if(items.get(space).count<items.get(space).maxCount){
                    for(int i = queue.count;i>0;i--){
                        if(items.get(space).count>=items.get(space).maxCount){
                            break;
                        }
                        items.get(space).count++;
                        queue.count--;
                    }
                    if(queue.count==0){
                        queue.type="nothing";
                        queue.maxCount=0;
                    }
                }
                else if(items.get(space).count==items.get(space).maxCount){
                    switchAnItemWithQueue(space);
                }
            }
        }
    }