One student builds his civilization through military power, the other through advances in technology (no this isn't the Stargate Atlantis episode). At a certain point, everyone disappears. They play again and it happens again. An examination of the game code reveals that one virtual civilization had discovered time travel and were going back in time to harvest resources. What was it called? Who wrote it?
I think I found it!
The Gadget Factor by Sandy Landsman
From the book's description:
Two college freshmen create the ultimate computer game, a universe built to their own specifications, but complications arise when their formulas for time travel also work in the real world.
The match isn't exact. The two main characters, Worm and Mike, work on the code for the virtual world on alternate shifts with Mike trying to build the aspects of the universe that will guarantee that the society will survive while Worm programs the aspects that will make it fall apart. After they finish programming the game, they start playing. Mike emphasizes advancement in social spheres while delaying the growth of technology. It's not establish what exactly Worm is doing on his turns, but it results in the virtual society using every new development in new warlike manners.
After Mike develops the three equations that seem to predict time travel, he sets up outside circumstances that will result in the virtual civilization discovering them, and thereby time travel. He quickly learns that it results in zero population at all time frames because, after time travel is discovered, the societies proceed to harvest all resources from the past and dump all pollution into the future until the ecosystem in the past collapses from lack of resources, erasing the present as well. After Mike learns that the equations do not disagree with real world data, he and Worm have to embark on a quest to prevent a fame-hungry professor from publishing their equations and thereby opening time travel up for exploitation.
Ultimately, after attempting to sabotage the professor's equations before his presentation, they seem to have failed until they discover that the equations fail when you include anti-matter into the equation, thus showing that time travel is not possible.