On 18 July 1944, while taking part in Operation Goodwood, he was commanding a group of M4 Sherman tanks east of Cagny that suddenly encountered a mixed group of four German tanks at a range of only 300 yards .