Yet another JavaScript implementation of popular Lines game