Plan 9 from Bell Labs’s /usr/web/sources/plan9/sys/src/games/4s.c

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#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}},

	{ 0, 4, 3,2,  { 0,0,  1,0,  1,0, -1,1 }},
	{ 1, 4, 2,3,  { 1,0, -1,1,  1,0,  0,1 }},
	{ 2, 4, 3,2,  { 1,0, -1,1,  1,0,  1,0 }},
	{ 3, 4, 2,3,  { 0,0,  0,1,  0,1,  1,-1}},

	{ 0, 5, 3,2,  { 0,0,  1,0,  0,1,  1,0 }},
	{ 1, 5, 2,3,  { 1,0,  0,1,  -1,0, 0,1 }},
	{ 2, 5, 3,2,  { 0,0,  1,0,  0,1,  1,0 }},
	{ 3, 5, 2,3,  { 1,0,  0,1,  -1,0, 0,1 }},

	{ 0, 6, 3,2,  { 0,1,  1,0,  0,-1, 1,0 }},
	{ 1, 6, 2,3,  { 0,0,  0,1,  1,0,  0,1 }},
	{ 2, 6, 3,2,  { 0,1,  1,0,  0,-1, 1,0 }},
	{ 3, 6, 2,3,  { 0,0,  0,1,  1,0,  0,1 }},
};

int NP = nelem(pieces);


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.