These are the books by Robert Westall that are reviewed on this site:
Children capture a German machine-gun, but their dream of defending their fortress against the German invasion turns into a nightmare.
It's bound to stir things up if you fight your way to a position of power in a computer-controlled world, and then develop a social conscience . . .