Move code into chess.js out of Details.cshtml