Oh yeah. Just call System.pacman().move() and System.ghosts().move() methods in a loop like this:
while(System.pacman().isAlive())
{
System.pacman().move();
System.ghosts().move();
}