Back to index

gcompris  8.2.2
traffic.h
Go to the documentation of this file.
00001 /* gcompris - traffic.h
00002  *
00003  * Copyright (C) 2003 Bruno Coudoin
00004  *
00005  * Based on the original code from Geoff Reedy <vader21@imsa.edu>
00006  * Copyright (C) 2000 Geoff Reedy 
00007  *
00008  *   This program is free software; you can redistribute it and/or modify
00009  *   it under the terms of the GNU General Public License as published by
00010  *   the Free Software Foundation; either version 2 of the License, or
00011  *   (at your option) any later version.
00012  *
00013  *   This program is distributed in the hope that it will be useful,
00014  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  *   GNU General Public License for more details.
00017  *
00018  *   You should have received a copy of the GNU General Public License
00019  *   along with this program; if not, write to the Free Software
00020  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021  */
00022 
00023 /* The format and the dataset for the traffic game in gcompris
00024  * is taken from from
00025  * http://www.javascript-games.org/puzzle/rushhour/
00026  * 
00027  * [LevelX]
00028  * CardY=string describing card 1
00029  * CardY=string describing card 2
00030  * ...
00031  * Where X is the Gcompris Level (in the control bar)
00032  * Where Y is the sublevel.
00033  * 
00034  * This is followed by a comma separated list defining the cars on the
00035  * grid. So the string looks as follows:
00036  * 
00037  * 'ID''X''Y'
00038  * 
00039  * - 'ID' is one char in the range A-R and X
00040  *   A-N Specify a different car color of size 2
00041  *   O-R Specify a different car color of size 3
00042  *   X   Always Red, the goal car of size 2
00043  * 
00044  * - 'X' xpos numbers between 
00045  *    1 to 6 for Vertical car
00046  *    A to F for Horizontal car
00047  * 
00048  * - 'Y' ypos numbers between
00049  *    1 to 6 for Horizontal car
00050  *    A to F for Vertical car
00051  *
00052  */
00053 
00054 static char *DataList[] = {
00055   /* [Level1] */
00056   "XB3,AA1,B5A,CE5,O1F,P2A,Q2D,RC6",
00057   "XA3,A1A,B2D,C3E,D5C,EE5,FA6,GD6,OD1,P2F,QA4",
00058   "XB3,AB4,B5B,CC6,O3D,P4F",
00059   "XB3,A4C,B5F,O1A,P1D,QD4,RC6",
00060   "XB3,AA1,B1F,D5A,EE5,FE6,G3F,O1D,P2A,Q2E,RB4",
00061   /* [Level2] */
00062   "XB3,AA1,B1D,CA2,DA4,E4C,F5A,O2E,P2F,Q3D,RD6",
00063   "XB3,A1B,BC1,C1E,D1F,E2D,F3F,IC4,H5D",
00064   "XA3,AD1,BC2,C2E,D3C,E3D,FA4,GE4,HA5,I5C,KA6,O1F,PD5,QD6",
00065   "XA3,A1B,BC1,CE1,D2D,EE2,F3F,G5C,H5F,O3E,P4A,QB4",
00066   "XB3,AA1,B1C,CE1,DA2,E5D,FE5,GA6,HE6,O2F,P3A,QB4",
00067   /* [Level3] */
00068   "XB3,AB1,B4C,E5F,O1A,P1D,QD4,RC6",
00069   "XA3,A1A,BB1,C5E,O1F,P2C,QD4,RA6",
00070   "XD3,AA1,BC1,C1E,D2C,E3B,FD4,G5D,HE5,IB6,KE6,O2F,P4A",
00071   "XC3,AA1,B1C,CE2,D3A,E3B,F3E,G3F,HC4,I5C,JE5,KA6",
00072   "XC3,AB1,BD1,CA2,DC2,E4C,F4D,GE5,HB6,ID6,O2E,P2F,Q3A,R3B",
00073   /* [Level4] */
00074   "XD3,AA1,BC1,C1E,D2A,EC2,F3B,GA6,O1F,P3C,QD4",
00075   "XA3,A1A,BC2,CE2,D3C,EA4,F5E,G5F,OB1,P4D,QA5,RA6",
00076   "XB3,AA1,B1C,CA2,DB5,O1D,P3A,QB4,RA6",
00077   "XC3,A1C,BD1,D3B,EC4,F4E,J2E,OB5",
00078   "XA3,A1A,BB2,C2D,D3C,E5C,FD5,OD1,P3F,QD6",
00079   /* [Level5] */
00080   "XB3,AA1,B1C,O1D,P2A,QB4,RD6",
00081   "XB3,A1C,B2A,CE2,D4B,EE4,F5A,GC5,H5F,OD1,P2D,QB6",
00082   "XD3,A2C,BD2,C4C,D4D,EE4,FE5,OC1,P1F,QC6",
00083   "XC3,A1C,BD1,C2B,D3A,E3E,FB4,G5E,HA6,OA5",
00084   "XB3,AA1,B1C,CE1,DA2,E3E,F5B,G5D,HE5,IE6,O2F,P3A,QB4",
00085   /* [Level6] */
00086   "XB3,A1B,B2A,C2D,D3F,E4A,F5C,G5F,HD6,OD1,P2E,RB4",
00087   "XA3,A1A,BB1,CB2,D3C,ED4,F5C,O1D,P3F,RD6",
00088   "XA3,A1D,BE2,C4A,D4B,ED4,FA6,GC6,OA1,P2C,Q4F,RC5",
00089   "XA3,A2C,B3F,C4A,DB4,ED4,FB5,G5D,H5F,OA1,P1E,RA6",
00090   "XB3,A1C,B2D,CA4,DC4,EA6,FC6,O1A,PD1,Q4F",
00091   /* [Level7] */
00092   "XB3,AA1,B2D,CE2,D3A,ED4,FA5,OD1,P3F,Q4C,RD6",
00093   "XA3,AA1,B1D,CE1,D4A,EB4,FD4,HA6,K5D,O1C,P4F",
00094   "XA3,A1B,BE1,DB4,ED4,FB5,G5D,H5E,I4A,P4F,QA6,R1C",
00095   "XA3,A1A,B2D,C3E,D4D,E5C,FE5,HD6,IA6,P2F,QA4,RD1",
00096   "XA3,AD1,B2D,DB5,E5D,F5E,GA6,K4A,O1C,P1F,QB4",
00097   /* [Level8] */
00098   "XC3,AE1,B2B,CC2,D4D,E5C,FE5,GA6,O1A,PB1,Q2F,RA4",
00099   "XB3,AA1,B1C,CE1,DA2,E5D,FE5,GA6,HE6,O2E,P2F,Q3A,RB4",
00100   "XA3,A1A,BB2,C2D,D3C,ED4,F5C,GD5,OD1,QD6,R3F",
00101   "XA3,A1C,B2D,C3C,DA4,ED4,F5A,G5B,HC5,IC6,OD1,R3F",
00102   "XD3,AB1,B1E,C2B,D2C,E4D,F5C,GE5,HA6,ID6,O1A,P2F,QA4"
00103 };