~hangman8086-devs/hangman8086/competition-mode

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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;      __   __  _______  __    _  _______  __   __  _______  __    _       ;;
;;     |  | |  ||   _   ||  |  | ||       ||  |_|  ||   _   ||  |  | |      ;;
;;     |  |_|  ||  |_|  ||   |_| ||    ___||       ||  |_|  ||   |_| |      ;;
;;     |       ||       ||       ||   | __ |       ||       ||       |      ;;
;;     |       ||       ||  _    ||   ||  ||       ||       ||  _    |      ;;
;;     |   _   ||   _   || | |   ||   |_| || ||_|| ||   _   || | |   |      ;;
;;     |__| |__||__| |__||_|  |__||_______||_|   |_||__| |__||_|  |__|      ;;
;;                                                                          ;;
;;                                                                          ;;
;;  HANGMAN - An implementation of the Hang Man game in assembly (Emu8086)  ;;
;;                                                                          ;;
;;  Copyright (C) 2011  Fabien LOISON                                       ;;
;;  Copyright (C) 2011  Mathilde BOUTIGNY                                   ;;
;;  Copyright (C) 2011  Vincent PEYROUSE                                    ;;
;;  Copyright (C) 2011  Germain CARRÉ                                       ;;
;;  Copyright (C) 2011  Matthis FRENAY                                      ;;
;;                                                                          ;;
;;  HangMan 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/>.   ;;
;;                                                                          ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


;;
;; Contains the ASCII art of the game.
;;



;============================================================ Header Logo ====
header db " __   __  _______  __    _  _______  __   __  _______  __    _ $"
       db "|  | |  ||   _   ||  |  | ||       ||  |_|  ||   _   ||  |  | |$"
       db "|  |_|  ||  |_|  ||   |_| ||    ___||       ||  |_|  ||   |_| |$"
       db "|       ||       ||       ||   | __ |       ||       ||       |$"
       db "|       ||       ||  _    ||   ||  ||       ||       ||  _    |$"
       db "|   _   ||   _   || | |   ||   |_| || ||_|| ||   _   || | |   |$"
       db "|__| |__||__| |__||_|  |__||_______||_|   |_||__| |__||_|  |__|$"

header_len    equ 64
header_height equ  7



;============================================================ Header Logo ====
gameover db "   _____                         ____                  $"
         db "  / ____|                       / __ \                 $"
         db " | |  __  __ _ _ __ ___   ___  | |  | |__   _____ _ __ $"
         db " | | |_ |/ _` | '_ ` _ \ / _ \ | |  | |\ \ / / _ \ '__|$"
         db " | |__| | (_| | | | | | |  __/ | |__| | \ V /  __/ |   $"
         db "  \_____|\__,_|_| |_| |_|\___|  \____/   \_/ \___|_|   $"

gameover_len    equ 56
gameover_height equ  6



;========================================================= Startup Screen ====
startup_scr db "  ____  _____ ____ _____ _____    _    __  __  $"
            db " | __ )| ____/ ___|_   _| ____|  / \  |  \/  | $"
            db " |  _ \|  _| \___ \ | | |  _|   / _ \ | |\/| | $"
            db " | |_) | |___ ___) || | | |___ / ___ \| |  | | $"
            db " |____/|_____|____/ |_| |_____/_/   \_\_|  |_| $"
            db "                                               $"
            db "                 - Presents -                  $"
            db "                                               $"
            db "                                               $"
            db "                                               $"
            db "                                               $"
            db "                                               $"
            db "                                               $"
            db "    Copyright (C) 2011  Fabien LOISON          $"
            db "    Copyright (C) 2011  Mathilde BOUTIGNY      $"
            db "    Copyright (C) 2011  Vincent PEYROUSE       $"
            db "    Copyright (C) 2011  Germain CARRE          $"
            db "    Copyright (C) 2011  Matthis FRENAY         $"

startup_scr_len    equ 48
startup_scr_height equ 18



;================================================================= Gibbet ====
GIBBET_WIDTH  equ 15
GIBBET_HEIGHT equ  9

HANGMAN_LIVES_10 db "              $"
                 db "              $"
                 db "              $"
                 db "              $"
                 db "              $"
                 db "              $"
                 db "              $"
                 db "              $"
                 db "              $"

HANGMAN_LIVES_09 db "              $"
                 db "              $"
                 db "              $"
                 db "              $"
                 db "              $"
                 db "              $"
                 db "+------------+$"
                 db "|            |$"
                 db "+------------+$"

HANGMAN_LIVES_08 db "+             $"
                 db "|             $"
                 db "|             $"
                 db "|             $"
                 db "|             $"
                 db "|             $"
                 db "+------------+$"
                 db "|            |$"
                 db "+------------+$"

HANGMAN_LIVES_07 db "+------+      $"
                 db "|             $"
                 db "|             $"
                 db "|             $"
                 db "|             $"
                 db "|             $"
                 db "+------------+$"
                 db "|            |$"
                 db "+------------+$"

HANGMAN_LIVES_06 db "+------+      $"
                 db "|      |      $"
                 db "|             $"
                 db "|             $"
                 db "|             $"
                 db "|             $"
                 db "+------------+$"
                 db "|            |$"
                 db "+------------+$"

HANGMAN_LIVES_05 db "+------+      $"
                 db "|      |      $"
                 db "|      O      $"
                 db "|             $"
                 db "|             $"
                 db "|             $"
                 db "+------------+$"
                 db "|            |$"
                 db "+------------+$"

HANGMAN_LIVES_04 db "+------+      $"
                 db "|      |      $"
                 db "|      O      $"
                 db "|      |      $"
                 db "|             $"
                 db "|             $"
                 db "+------------+$"
                 db "|            |$"
                 db "+------------+$"

HANGMAN_LIVES_03 db "+------+      $"
                 db "|      |      $"
                 db "|      O      $"
                 db "|     /|      $"
                 db "|             $"
                 db "|             $"
                 db "+------------+$"
                 db "|            |$"
                 db "+------------+$"

HANGMAN_LIVES_02 db "+------+      $"
                 db "|      |      $"
                 db "|      O      $"
                 db "|     /|\     $"
                 db "|             $"
                 db "|             $"
                 db "+------------+$"
                 db "|            |$"
                 db "+------------+$"

HANGMAN_LIVES_01 db "+------+      $"
                 db "|      |      $"
                 db "|      O      $"
                 db "|     /|\     $"
                 db "|     /       $"
                 db "|             $"
                 db "+------------+$"
                 db "|            |$"
                 db "+------------+$"

HANGMAN_LIVES_00 db "+------+      $"
                 db "|      |      $"
                 db "|      O      $"
                 db "|     /|\     $"
                 db "|     / \     $"
                 db "|             $"
                 db "+------------+$"
                 db "|            |$"
                 db "+------------+$"


HANGMAN_GAMEOVER_00 db "+------+      $"
                    db "|      |      $"
                    db "|      O      $"
                    db "|     /|\     $"
                    db "|     / \     $"
                    db "|             $"
                    db "+------------+$"
                    db "|  YOU  DIE  |$"
                    db "+------------+$"

HANGMAN_GAMEOVER_01 db "+------+      $"
                    db "|     /       $"
                    db "|   _O        $"
                    db "|  _/\        $"
                    db "|   \         $"
                    db "|             $"
                    db "+------------+$"
                    db "|  YOU  DIE  |$"
                    db "+------------+$"

HANGMAN_GAMEOVER_02 db "+------+      $"
                    db "|      |      $"
                    db "|      O      $"
                    db "|     /|\     $"
                    db "|     / \     $"
                    db "|             $"
                    db "+------------+$"
                    db "|            |$"
                    db "+------------+$"

HANGMAN_GAMEOVER_03 db "+------+      $"
                    db "|       \     $"
                    db "|        O_   $"
                    db "|        /\_  $"
                    db "|         /   $"
                    db "|             $"
                    db "+------------+$"
                    db "|  YOU  DIE  |$"
                    db "+------------+$"


HANGMAN_GOODGAME_00 db "+------+      $"
                    db "|      |      $"
                    db "|             $"
                    db "|      O      $"
                    db "|     /|\     $"
                    db "|     / \     $"
                    db "+------------+$"
                    db "| GOOD  GAME |$"
                    db "+------------+$"

HANGMAN_GOODGAME_01 db "+------+      $"
                    db "|      |      $"
                    db "|             $"
                    db "|      O_     $"
                    db "|     /|      $"
                    db "|     / \     $"
                    db "+------------+$"
                    db "| GOOD  GAME |$"
                    db "+------------+$"

HANGMAN_GOODGAME_02 db "+------+      $"
                    db "|      |      $"
                    db "|             $"
                    db "|      O/     $"
                    db "|     /|      $"
                    db "|     / \     $"
                    db "+------------+$"
                    db "| GOOD  GAME |$"
                    db "+------------+$"

HANGMAN_GOODGAME_03 db "+------+      $"
                    db "|      |      $"
                    db "|             $"
                    db "|      O_     $"
                    db "|     /|      $"
                    db "|     / \     $"
                    db "+------------+$"
                    db "|            |$"
                    db "+------------+$"