The teenagers, all wearing earphones, were so absorbed in the game that they failed to notice an approaching train.