AITA for making my classmates fail the subject?

After having been a complete doormat 31030103 times, I got fed up and did something I shouldn't have done: I didn't write my friends' names on a college assignment and they ended up failing because they didn't get enough points to pass. They didn't help at all with the assignment, I did everything myself, of course I don't have a problem with that, cause I wanted to make them happy, but when I handed it in, they started saying things like: “If it sucks, I won't mince my words” and nitpicking, like saying that the layout of the slide wasn't the way they wanted it to be. I got so worked up and did it recklessly. Eventually I got 100 marks and lost their friendship, I don't know if I was an asshole or not?