1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
/* gcompris - traffic.h
*
* Copyright (C) 2003 Bruno Coudoin
*
* Based on the original code from Geoff Reedy <vader21@imsa.edu>
* Copyright (C) 2000 Geoff Reedy
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
/* The format and the dataset for the traffic game in gcompris
* is taken from from
* http://www.javascript-games.org/puzzle/rushhour/
*
* [LevelX]
* CardY=string describing card 1
* CardY=string describing card 2
* ...
* Where X is the Gcompris Level (in the control bar)
* Where Y is the sublevel.
*
* This is followed by a comma separated list defining the cars on the
* grid. So the string looks as follows:
*
* 'ID''X''Y'
*
* - 'ID' is one char in the range A-R and X
* A-N Specify a different car color of size 2
* O-R Specify a different car color of size 3
* X Always Red, the goal car of size 2
*
* - 'X' xpos numbers between
* 1 to 6 for Vertical car
* A to F for Horizontal car
*
* - 'Y' ypos numbers between
* 1 to 6 for Horizontal car
* A to F for Vertical car
*
*/
static char *DataList[] = {
/* [Level1] */
"XB3,AA1,B5A,CE5,O1F,P2A,Q2D,RC6",
"XA3,A1A,B2D,C3E,D5C,EE5,FA6,GD6,OD1,P2F,QA4",
"XB3,AB4,B5B,CC6,O3D,P4F",
"XB3,A4C,B5F,O1A,P1D,QD4,RC6",
"XB3,AA1,B1F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