A roguelike developer's diary.
So, array comparison.
How about JSON.stringify()? It should work for arbitrary arrays or objects.
Trap for young players: If you're going to declare an Array.prototype.compare you need to do so before you create any arrays... pushing works perfectly.
Although I've seen Underscore mentioned a few times, I've not explored it deeply as I was planning on jumping straight to Coffee Script. But neither of two OSes I develop on can run npm (node package manager), so all that is on hold at the moment,
Post a Comment