the invention of chess