From 57a8d8360c85528fb477e76ef1a5f2eeb151be14 Mon Sep 17 00:00:00 2001 From: McSinyx Date: Wed, 18 May 2016 14:25:25 +0700 Subject: Initial commit --- bin/.local/bin/2048.c | 11 +++++++++++ bin/.local/bin/scot.sh | 3 +++ 2 files changed, 14 insertions(+) create mode 100644 bin/.local/bin/2048.c create mode 100755 bin/.local/bin/scot.sh (limited to 'bin') diff --git a/bin/.local/bin/2048.c b/bin/.local/bin/2048.c new file mode 100644 index 0000000..197b66f --- /dev/null +++ b/bin/.local/bin/2048.c @@ -0,0 +1,11 @@ +M[16],X=16,W,k;main(){T(system("stty cbreak") +);puts(W&1?"WIN":"LOSE");}K[]={2,3,1};s(f,d,i +,j,l,P){for(i=4;i--;)for(j=k=l=0;k<4;)j<4?P=M +[w(d,i,j++)],W|=P>>11,l*P&&(f?M[w(d,i,k)]=l<< +(l==P):0,k++),l=l?P?l-P?P:0:l:P:(f?M[w(d,i,k) +]=l:0,++k,W|=2*!l,l=0);}w(d,i,j){return d?w(d +-1,j,3-i):4*i+j;}T(i){for(i=X+rand()%X;M[i%X] +*i;i--);i?M[i%X]=2<>X)%4]));}//[2048] diff --git a/bin/.local/bin/scot.sh b/bin/.local/bin/scot.sh new file mode 100755 index 0000000..8e9dc1c --- /dev/null +++ b/bin/.local/bin/scot.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cd ~/Pictures/Screenshots +scrot '%F_%T.png' -- cgit 1.4.1