Logo Search packages:      
Sourcecode: vgagamespack version File versions

misquare.h

/*
 * Mines
 *
 * Copyright (C) Evan Harris, 1994, 1995.
 *
 * Permission is granted to freely redistribute and modify this code,
 * providing the author(s) get credit for having written it.
 */

static unsigned char squarelines[89][16] = {
/* blank */
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
{ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, },

/* 1 */
{ 0, 2, 2, 2, 2, 2, 2, 2, 4, 4, 2, 2, 2, 2, 2, 2, },
{ 0, 2, 2, 2, 2, 2, 2, 4, 4, 4, 2, 2, 2, 2, 2, 2, },
{ 0, 2, 2, 2, 2, 2, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, },
{ 0, 2, 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, },

/* 2 */
{ 0, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, },
{ 0, 2, 2, 2, 2, 3, 3, 2, 2, 2, 3, 3, 2, 2, 2, 2, },
{ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, },
{ 0, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, },
{ 0, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 2, },
{ 0, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 2, 2, },
{ 0, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, },
{ 0, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, },
{ 0, 2, 2, 2, 2, 3, 3, 2, 2, 2, 3, 3, 2, 2, 2, 2, },
{ 0, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, },

/* 3 */
{ 0, 2, 2, 2, 2, 2, 7, 7, 7, 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1, 1, 1, 10, 10, 1, 1, 0, 10, 10, 1, 1, 1, 0, },
{ 0, 6, 1, 1, 10, 10, 1, 1, 0, 0, 0, 10, 10, 1, 1, 0, },
{ 0, 6, 1, 10, 10, 1, 1, 0, 0, 0, 0, 0, 10, 10, 1, 0, },
{ 0, 6, 10, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10, 0, },

/* mine - grey background */
{ 0, 6, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, },
{ 0, 6, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, },
{ 0, 6, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, },
{ 0, 6, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, },
{ 0, 6, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, },

/* X-ed mine */
{ 0, 6, 4, 4, 1, 1, 1, 1, 0, 1, 1, 1, 1, 4, 4, 0, },
{ 0, 6, 1, 4, 4, 1, 0, 0, 0, 0, 0, 1, 4, 4, 1, 0, },
{ 0, 6, 1, 1, 4, 4, 0, 0, 0, 0, 0, 4, 4, 1, 1, 0, },
{ 0, 6, 1, 1, 0, 4, 4, 0, 0, 0, 4, 4, 0, 1, 1, 0, },
{ 0, 6, 1, 1, 0, 0, 4, 4, 0, 4, 4, 0, 0, 1, 1, 0, },
{ 0, 6, 1, 0, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 1, 0, },

};


static unsigned char square[17][16] = {
{ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, },
{ 0, 1, 1, 2, 3, 4, 2, 2, 2, 2, 2, 2, 5, 1, 1, 1, },
{ 0, 1, 1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1, 1, 1, },
{ 0, 1, 1, 16, 17, 18, 18, 19, 18, 18, 18, 17, 16, 1, 1, 1, },
{ 0, 1, 1, 20, 21, 22, 23, 24, 25, 20, 20, 20, 26, 1, 1, 1, },
{ 0, 1, 1, 27, 28, 28, 28, 29, 30, 30, 30, 31, 32, 1, 1, 1, },
{ 0, 1, 1, 33, 34, 35, 35, 36, 37, 37, 37, 37, 38, 1, 1, 1, },
{ 0, 1, 1, 39, 40, 41, 41, 42, 43, 44, 44, 44, 44, 1, 1, 1, },
{ 0, 1, 1, 45, 46, 46, 46, 45, 46, 46, 46, 46, 45, 1, 1, 1, },
{ 0, 47, 47, 48, 49, 50, 51, 51, 52, 51, 51, 50, 49, 48, 47, 47, }, /* mine */
{ 0, 53, 54, 54, 55, 56, 57, 56, 55, 58, 58, 59, 60, 54, 54, 61, }, /* flag */
{ 0, 53, 54, 62, 63, 63, 64, 65, 65, 54, 54, 65, 65, 54, 54, 61, }, /* ? */
{ 0, 53, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 61, }, 
{ 0, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, },
{ 0, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 54, 61, }, /* Xflag */
{ 0, 53, 54, 78, 79, 80, 81, 81, 82, 81, 81, 80, 79, 78, 54, 61, }, /* Gmine */
{ 0, 53, 54, 83, 84, 85, 86, 87, 88, 87, 86, 85, 84, 83, 54, 61, }, /* Xmine */
};

Generated by  Doxygen 1.6.0   Back to index