Javascript board game grid