Lines game my implentation to sharp javascript skills