protected static boolean isSquareMatch(int x, int y, 
                                           SquareColour squareColour, 
                                           SquaresMatrix squaresMatrix) {
        if(x < 0 || y < 0)
            return false;
        
        if(!(squareColour instanceof SquareColour))
            return false;
        
        if(!(squaresMatrix instanceof SquaresMatrix))
            return false;
        
        if(x >= squaresMatrix.getNumberOfColumns() ||
           y >= squaresMatrix.getNumberOfRows())
            return false;
        
        if(squaresMatrix.isPositionAvailable(x, y))
            return false;
        
        if(squaresMatrix.getSquare(x, y).getSquareColour() == squareColour)
            return true;
        
        return false;
    }