Tanks didn't win the war, but the American surge of power (2,000,000 troops in the front lines) did. Especially when the Meuse Argonne Offensive smashed through the German flank, cut their rail lines, and starved all their troops north of Verdun of supplies, reinforcement, and ammo, forcing them to begin the long fighting retreat to their border.
City combat during the offensive.