/***************************************************************************\ |* *| |* pieces.c: A version of Tetris to run on ordinary terminals, *| |* (ie., not needing a workstation, so should available *| |* to peasant Newwords+ users. This module contains the *| |* definitions of the pieces. *| |* *| |* Author: Mike Taylor (mirk@uk.co.ssl) *| |* Started: Fri May 26 12:26:05 BST 1989 *| |* *| \***************************************************************************/ #include "tt.h" #include "pieces.h" /*-------------------------------------------------------------------------*/ struct piece pieces4[] = { { "[]", 4, /* Square piece */ { {{0,0}, {0,1}, {1,0}, {1,1}}, {{0,0}, {0,1}, {1,0}, {1,1}}, {{0,0}, {0,1}, {1,0}, {1,1}}, {{0,0}, {0,1}, {1,0}, {1,1}} } }, { "<>", 2, /* Long piece */ { {{0,0}, {1,0}, {2,0}, {3,0}}, {{1,-1}, {1,0}, {1,1}, {1,2}}, {{0,0}, {1,0}, {2,0}, {3,0}}, {{1,-1}, {1,0}, {1,1}, {1,2}} } }, { "()", 3, /* L-shaped piece */ { {{0,0}, {1,0}, {2,0}, {2,1}}, {{0,1}, {1,-1}, {1,0}, {1,1}}, {{0,-1}, {0,0}, {1,0}, {2,0}}, {{1,-1}, {1,0}, {1,1}, {2,-1}} } }, { "{}", 3, /* Backwards L-shaped piece */ { {{0,0}, {1,0}, {2,-1}, {2,0}}, {{1,-1}, {1,0}, {1,1}, {2,1}}, {{0,0}, {0,1}, {1,0}, {2,0}}, {{0,-1}, {1,-1}, {1,0}, {1,1}} } }, { "##", 1, /* T-shaped piece */ { {{1,-1}, {1,0}, {1,1}, {2,0}}, {{0,0}, {1,0}, {1,1}, {2,0}}, {{0,0}, {1,-1}, {1,0}, {1,1}}, {{0,0}, {1,-1}, {1,0}, {2,0}} } }, { "%%", 5, /* S-shaped piece */ { {{0,0}, {0,1}, {1,-1}, {1,0}}, {{0,-1}, {1,-1}, {1,0}, {2,0}}, {{0,0}, {0,1}, {1,-1}, {1,0}}, {{0,-1}, {1,-1}, {1,0}, {2,0}} } }, { "@@", 5, /* Backwards S-shaped piece */ { {{0,-1}, {0,0}, {1,0}, {1,1}}, {{0,0}, {1,-1}, {1,0}, {2,-1}}, {{0,-1}, {0,0}, {1,0}, {1,1}}, {{0,0}, {1,-1}, {1,0}, {2,-1}} } }, }; /*-------------------------------------------------------------------------*/