Javascript color-lines game