This game:
http://www.chess.com/echess/game.html?id=76069
is definitely a work of art! From my experience as a retired computer programmer, I'm guessing that 8 of any piece probably qualifies as 0 (3 bits allocated for number of each piece, and 7 increments to 0).
As for which mates take more than 50 moves: according to Fine and Benko, Basic Chess Endings, p. 271, this can be true for 2 bishops vs. knight. Don't ask for details!
Another item which I'm curious about but too lazy to test... what about 3 repetitions of position? My recollection is that this can be demanded as a draw but is not automatic. Does a button appear "Demand Draw" at this point?
Okay Okay. Maybe that's what I get for playing around but the server just called my game a draw for "insufficient mating material." I had just promoted to a Knight... my eighth on the board.
So how is the server testing for mating material? Looking for Bishops? It only takes three Knights to force a mate so I had five to spare. Am I the only person who tests this stuff?
And what happens if I get one of those endings that require more than 50 moves to force a mate? Okay I don't know what they are but they must exist because most chess organizations have rules saying if you can prove a forced mate then the 50 move rule is waived. There supposed to be some fancy minor piece mates that require over 200 moves. Urban legend? I thought I read it in Chess Life. I don't even remeber where I heard it from.
But I know how to mate with minor pieces when the other guy doesn't have any. BBKvk BNKvk and NNNKvk. and of course the NNNNNNNNKvk I was setting up.
Time to peer at the code some more.
P.S. The stalemate function seems to work okay.