I have a problem where my if condition doesn't trigger properly and I have no idea why.
Here is the function calling `ModelField`:

```
public void squareMaker(){
    for (int i = 0; i<=_model.getSizeofgame()-1; i++){
        _squares.add(new JButton());
        _model.Modelfield(i, 'u');
        _squares.elementAt(i).setBorder(_border);
        _squares.elementAt(i).setActionCommand("" +i);
        _squares.elementAt(i).addActionListener(_controller);
        this.add(_squares.get(i));
        System.out.println("Square in gamepanel " + i);
    }
}

```

And the actual function in model:

```
public void Modelfield(int pos, char symb){
    int position=pos+1;
    System.out.println("Adding square in model "+position +" boardsize "+boardsize);

    if((position%boardsize)==0){
        System.out.println("Right edge "+position);
        if(position<=Boardwidth){
            modelVector.elementAt(position).redge=true;
            System.out.println("Top and Right edge ");
        }
        else{
            System.out.println("Not top edge");
        }
    }
    else {
    }
    modelVector.addElement(new Fieldpiece(position,symb));
}

```

So what is supposed to happen is that when I call Modelfield from squareMaker it never gets past the
`if((position%boardsize)==0)`

Does anyone have any clue why?