HTML 5 Canvas and JavaScript hexagonal territory game