Hexagonal Game Board Controller in JavaScript