]> Shamusworld >> Repos - warehouse-man-deluxe/blob - src/boards.cpp
Initial commit.
[warehouse-man-deluxe] / src / boards.cpp
1 //
2 // boards.cpp: Actual playable (we hope!) game boards
3 //
4 // by James Hammons
5 // © 2014 Underground Software
6 //
7 // JLH = James Hammons <jlhamm@acm.org>
8 //
9 // Who  When        What
10 // ---  ----------  ------------------------------------------------------------
11 // JLH  03/03/2014  Created this file
12 //
13
14 //
15 // We use anonymous structs to create these, to keep things simple. :-)
16 //
17 // Legend:
18 //   @ = Wall
19 //     = Space
20 //   X = Box
21 //   . = Spot to move box to
22 //   + = Spot to move box to, that already has a box on it
23 //   o = Player initial position
24 //
25
26 static const struct {
27         unsigned int width, height;
28         unsigned char state[5 * 5 + 1]; } board001 = { 5, 5,
29         "@@@@@"
30         "@o  @"
31         "@ X @"
32         "@ . @"
33         "@@@@@"
34 };
35
36
37 static const struct {
38         unsigned int width, height;
39         unsigned char state[7 * 7 + 1]; } board002 = { 7, 7,
40         "@@@@@@@"
41         "@     @"
42         "@ X.X @"
43         "@ .@. @"
44         "@ X.X @"
45         "@o    @"
46         "@@@@@@@"
47 };
48
49
50 static const struct {
51         unsigned int width, height;
52         unsigned char state[7 * 5 + 1]; } board003 = { 7, 5,
53         "@@@@@@@"
54         "@. X .@"
55         "@ XoX @"
56         "@. X .@"
57         "@@@@@@@"
58 };
59
60
61 static const struct {
62         unsigned int width, height;
63         unsigned char state[8 * 5 + 1]; } board004 = { 8, 5,
64         "@@@@@@@@"
65         "@  ..X @"
66         "@ Xo X @"
67         "@ X..  @"
68         "@@@@@@@@"
69 };
70
71
72 static const struct {
73         unsigned int width, height;
74         unsigned char state[8 * 7 + 1]; } board005 = { 8, 7,
75         " @@@@@@@"
76         " @     @"
77         "@@ .X. @"
78         "@o X X @"
79         "@  .X. @"
80         "@@     @"
81         " @@@@@@@"
82 };
83
84
85 static const struct {
86         unsigned int width, height;
87         unsigned char state[8 * 8 + 1]; } board006 = { 8, 8,
88         " @@@@@  "
89         "@@   @@@"
90         "@  @   @"
91         "@ @  @ @"
92         "@ X X@ @"
93         "@.@    @"
94         "@. o@@@@"
95         "@@@@@   "
96 };
97
98
99 static const struct {
100         unsigned int width, height;
101         unsigned char state[8 * 6 + 1]; } board007 = { 8, 6,
102         "@@@@@@@@"
103         "@ X. X.@"
104         "@o.X X.@"
105         "@ X. X.@"
106         "@ .X X.@"
107         "@@@@@@@@"
108 };
109
110
111 static const struct {
112         unsigned int width, height;
113         unsigned char state[10 * 8 + 1]; } board008 = { 10, 8,
114         "   @@@@@@@"
115         "  @@  @ o@"
116         "  @   @  @"
117         "  @X X X @"
118         "  @ X@@  @"
119         "@@@ X @ @@"
120         "@.....  @ "
121         "@@@@@@@@@ "
122 };
123
124
125 static const struct {
126         unsigned int width, height;
127         unsigned char state[9 * 7 + 1]; } board009 = { 9, 7,
128         "@@@@@@@@@"
129         "@   +   @"
130         "@ X.@.X @"
131         "@  X.X  @"
132         "@@@.X.@@@"
133         "  @@o@@  "
134         "   @@@   "
135 };
136
137
138 static const struct {
139         unsigned int width, height;
140         unsigned char state[7 * 7 + 1]; } board010 = { 7, 7,
141         "  @@@@@"
142         "@@@   @"
143         "@o .X.@"
144         "@  X X@"
145         "@@@.X.@"
146         "  @   @"
147         "  @@@@@"
148 };
149
150
151 static const struct {
152         unsigned int width, height;
153         unsigned char state[10 * 8 + 1]; } board011 = { 10, 8,
154         "  @@@@    "
155         "  @  @    "
156         "@@@  @@@@@"
157         "@  ..X   @"
158         "@oX.. X  @"
159         "@@@ X@@@@@"
160         "  @  @    "
161         "  @@@@    "
162 };
163
164
165 static const struct {
166         unsigned int width, height;
167         unsigned char state[10 * 6 + 1]; } board012 = { 10, 6,
168         " @@@@@@@@@"
169         "@@       @"
170         "@   @X@X @"
171         "@ XX  .X.@"
172         "@ o@@@...@"
173         "@@@@ @@@@@"
174 };
175
176
177 const void * boards[] = {
178         &board001, &board002, &board003, &board004, &board005, &board006, &board007, &board008,
179         &board009, &board010, &board011, &board012, //&board013, &board014, &board015, &board016,
180 };
181