A 23-year-old man allegedly admitted to murdering an 11-year-old girl because he was "angry" about losing a game of Fortnite.