dynamic bit board data structure in Javascript programming language