Hamiltonian potential functions for differential games