Anyone remember the episode "A TASTE OF ARMAGEDDON"?
Here's a synopsis.
Kirk learns that the war is fought by computer simulations instead of real weapons, and the people calculated as casualties voluntarily report to disintigration chambers to die, but the planets' culture and infrastructure survive. Since the Enterprise is in orbit, it becomes a target in the virtual war, and in the latest attack, the ship is listed destroyed by a tricobalt satellite explosion, and everyone on the Enterprise is ordered to beam down to the planet to be killed.
Coming to a battlefield near you! Heh.