Extract method and delete unrelated code

1 extract the method in Board class from the  conditional statment to
the new method named squareposition, hide the function in the method
only pass the parameter to the new method.
2 deleted the unrelated code in the ConnectionBridge Class