A Distributed Algorithm for Optimising over Pure Strategy Nash Equilibria