I doubt it’s supposed to, it’s to calculate who wins when writing your own poker implementation. I am not the author, but calculating the winner is non trivial.
I kind of want to take your 50 line challenge however :) I always loved playing poker, might be a fun exercise.