It sounds like you are referring to the Battle of Midway, which took place in June 1942 during World War II. This battle was a pivotal naval engagement between the United States and Japan, and it significantly shifted the balance of power in the Pacific theater.
The Americans had successfully broken Japanese naval codes, which allowed them to anticipate and counter Japanese plans. This intelligence advantage enabled U.S. forces to set a trap for the Japanese fleet, leading to a decisive victory for the Americans. The loss of four Japanese aircraft carriers—Akagi, Kaga, Soryu, and Hiryu—greatly weakened Japan's naval strength and shifted the momentum of the war in favor of the Allies.
If you have specific details or aspects of the battle you'd like to know more about, feel free to ask!