Mr. Obama, who has played hoops on Election Day since his first victory in 2008, left the White House before 8 a.m. and traveled in a motorcade to Fort McNair in Washington for a game at a gym on the military base.