WarGames
This entry may contain information about the plot and ending of this film. See Wikipedia contains spoilers for more detail.
War Games was a 1983 science fiction film directed by Bob and starring Matthew Broderick, in his first major film role, as David Lightman, Ally Sheedy as Jennifer Mack and Dabney Coleman as John McKittrick. In the film Broderick, a hacker, manages to gain access to the NORAD military artificial intelligence computer system called WOPR (War Operations Plan and Response) that can control the United States' arsenal of ICBMs.
The teenager, unaware of the machine's real purpose, discovers what he believes to be a simulation game called "Global Thermonuclear War" and begins to "play". Unbeknownst to him, WOPR sets in motion preparations for a real attack against the Soviet Union. With the aid of the machine's creator, disaster is narrowly averted when the hacker manages to teach WOPR about the futility of war by getting it to play endless drawn games of tic-tac-toe against itself which segue into cycles through all the nuclear war stategies that WOPR has devised. WOPR then learns that "the only winning move is not to play".
It was in part a cautionary tale about technology and the dangers of leaving machines in control of unleashing destruction, in an echo of the Doomsday device of Dr Strangelove, and the generalized idea in the cold war period in the 1970s and 1980s that somewhere there was a "button" that when pressed will nuke the whole world away. Also, it was one of the first movies to deal with teenage hackers and their activities.