as well as providing defense for the houses , these moats provided easy access to water , and provided an excellent wallow for the pigs , who lay blissfully sunk in the mud of the ditch , handy when wanted .