Whole wards of the Princess of Wales in Bridgend were evacuated after the roof was found to be rotting. Courtney Matthews threw the cup of poo in a revenge attack, Cardiff Crown Court heard.