summaryrefslogtreecommitdiff
path: root/sys/src/games/4s.c
diff options
context:
space:
mode:
authorTaru Karttunen <taruti@taruti.net>2011-03-30 15:46:40 +0300
committerTaru Karttunen <taruti@taruti.net>2011-03-30 15:46:40 +0300
commite5888a1ffdae813d7575f5fb02275c6bb07e5199 (patch)
treed8d51eac403f07814b9e936eed0c9a79195e2450 /sys/src/games/4s.c
Import sources from 2011-03-30 iso image
Diffstat (limited to 'sys/src/games/4s.c')
-rwxr-xr-xsys/src/games/4s.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/sys/src/games/4s.c b/sys/src/games/4s.c
new file mode 100755
index 000000000..04af468f7
--- /dev/null
+++ b/sys/src/games/4s.c
@@ -0,0 +1,43 @@
+#include "xs.h"
+
+int N = 4;
+
+Piece pieces[]={
+ { 0, 0, 4,1, { 0,0, 1,0, 1,0, 1,0 }},
+ { 1, 0, 1,4, { 0,0, 0,1, 0,1, 0,1 }},
+ { 2, 0, 4,1, { 0,0, 1,0, 1,0, 1,0 }},
+ { 3, 0, 1,4, { 0,0, 0,1, 0,1, 0,1 }},
+
+ { 0, 1, 3,2, { 0,0, 1,0, 1,0, 0,1 }},
+ { 1, 1, 2,3, { 1,0, 0,1, 0,1, -1,0 }},
+ { 2, 1, 3,2, { 0,0, 0,1, 1,0, 1,0 }},
+ { 3, 1, 2,3, { 0,0, 1,0, -1,1, 0,1 }},
+
+ { 0, 2, 3,2, { 0,1, 1,0, 1,0, 0,-1}},
+ { 1, 2, 2,3, { 0,0, 0,1, 0,1, 1,0 }},
+ { 2, 2, 3,2, { 0,0, 1,0, 1,0, -2,1 }},
+ { 3, 2, 2,3, { 0,0, 1,0, 0,1, 0,1 }},
+
+ { 0, 3, 2,2, { 0,1, 1,0, 0,-1, -1,0}},
+ { 1, 3, 2,2, { 0,1, 1,0, 0,-1, -1,0}},
+ { 2, 3, 2,2, { 0,1, 1,0, 0,-1, -1,0}},
+ { 3, 3, 2,2, { 0,1, 1,0, 0,-1, -1,0}},
+
+ {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