Skip to main content

Timeline for answer to Is My Swipe Pattern Legal? by HatsuPointerKun

Current License: CC BY-SA 3.0

Post Revisions

8 events
when toggle format what by license comment
Jan 7, 2021 at 6:51 comment added ceilingcat 231 bytes
Mar 29, 2018 at 13:54 comment added Adalynn d%2==0 => d%2<1
Mar 14, 2018 at 12:49 history edited HatsuPointerKun CC BY-SA 3.0
deleted 2 characters in body
Mar 9, 2018 at 16:34 comment added Adalynn You can change (d==2) to just d==2, I overlooked that before.
Feb 23, 2018 at 8:57 history edited HatsuPointerKun CC BY-SA 3.0
added 26 characters in body
Feb 23, 2018 at 3:20 comment added Adalynn int v(int s[]){int[]m=new int[10];int i=1,p=s[0],d,n,l=s.length;if(l<2)return 0;for(;i<l;++i){m[p]=1;if(m[s[i]]!=0)return 0;d=(d=p-s[i])<0?-d:d;if(d%2==0){n=(p+s[i])/2;if((d==4||d==8)&&n==5&&m[5]==0)return 0;if((d==2)&&(n==2&&m[2]==0||n==5&&m[5]==0||n==8&&m[8]==0))return 0;if(d==6&&(n==4&&m[4]==0||n==5&&m[5]==0||n==6&&m[6]==0))return 0;}p=s[i];}return 1;} should work (order of operations)
Feb 23, 2018 at 3:18 comment added Adalynn Woah. You're anwering in Java.
Feb 18, 2018 at 15:37 history answered HatsuPointerKun CC BY-SA 3.0