|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T p
Length: 2102 (0x836)
Types: TextFile
Names: »pieces.c«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
└─⟦this⟧ »EUUGD18/General/Tt/pieces.c«
/***************************************************************************\
|* *|
|* 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.ac.warwick.cs) *|
|* Started: Fri May 26 12:26:05 BST 1989 *|
|* *|
\***************************************************************************/
#include "tt.h"
#include "pieces.h"
/*-------------------------------------------------------------------------*/
struct piece pieces[NO_PIECES] = {
{ "[]", 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}}
}
},
};
/*-------------------------------------------------------------------------*/