-
Notifications
You must be signed in to change notification settings - Fork 46
/
game.cantonese
111 lines (93 loc) · 6.32 KB
/
game.cantonese
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
/*
Cantonese 实现迷宫小游戏
*/
使下 os
[] 拍住上 => |地图|
| 地图 嘅 加啲 (["■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■\n"])| 啦
| 地图 嘅 加啲 (["■","● "," "," "," "," "," "," "," "," "," ","■"," "," "," ","■","■"," "," "," ","■"," ","■","■","■"," ","■","■","■","■\n"])| 啦
| 地图 嘅 加啲 (["■"," ","■","■","■","■","■","■"," ","■"," ","■"," ","■"," "," "," "," ","■"," ","■"," ","■","■","■"," ","■","■","■","■\n"])| 啦
| 地图 嘅 加啲 (["■"," ","■"," "," "," ","■","■"," ","■"," "," "," ","■"," ","■","■","■","■"," ","■"," ","■","■","■"," "," "," ","■","■\n"])| 啦
| 地图 嘅 加啲 (["■"," "," "," ","■"," ","■","■"," "," ","■","■","■"," "," "," "," ","■"," "," ","■"," "," ","■","■"," ","■","■","■","■\n"])| 啦
| 地图 嘅 加啲 (["■","■","■","■","■"," ","■"," "," "," "," "," ","■"," ","■","■","■","■","■"," ","■","■"," "," "," "," ","■","■","■","■\n"])| 啦
| 地图 嘅 加啲 (["■"," "," "," ","■"," ","■","■","■","■","■"," ","■"," "," "," ","■"," "," "," ","■"," ","■"," ","■"," "," "," "," ","■\n"])| 啦
| 地图 嘅 加啲 (["■"," ","■"," ","■"," "," "," "," ","■","■"," ","■"," ","■","■","■","■"," ","■","■"," ","■"," ","■"," ","■","■","■","■\n"])| 啦
| 地图 嘅 加啲 (["■"," ","■"," ","■"," ","■","■"," "," "," "," "," "," ","■","■"," "," "," "," "," "," ","■"," ","■"," ","■","■","■","■\n"])| 啦
| 地图 嘅 加啲 (["■"," ","■"," ","■"," ","■","■","■","■","■","■","■"," ","■","■"," ","■","■","■","■","■","■"," ","■"," "," "," ","■","■\n"])| 啦
| 地图 嘅 加啲 (["■"," ","■"," "," "," ","■","■"," "," "," ","■","■","■","■","■","■","■","■","■","■","■"," ","■","■","■"," "," "," ","■\n"])| 啦
| 地图 嘅 加啲 (["■"," ","■","■","■","■","■","■"," ","■"," ","■","■","■","■","■"," "," ","■"," "," "," "," "," "," "," "," ","■"," ","■\n"])| 啦
| 地图 嘅 加啲 (["■"," "," "," "," "," "," "," "," ","■"," ","■"," "," "," "," "," ","■","■","■","■","■"," ","■","■","■"," ","■"," ","★\n"])| 啦
| 地图 嘅 加啲 (["■"," ","■","■","■","■","■","■","■","■"," ","■","■","■","■","■"," ","■","■","■","■","■"," ","■","■","■"," ","■","■","■\n"])| 啦
| 地图 嘅 加啲 (["■"," "," "," "," "," ","■"," ","■","■"," ","■","■","■","■","■"," ","■","■","■"," "," "," "," "," "," "," ","■","■","■\n"])| 啦
| 地图 嘅 加啲 (["■","■","■","■","■"," ","■"," ","■","■"," ","■"," "," "," "," "," "," ","■","■","■","■","■","■","■","■"," ","■"," ","■\n"])| 啦
| 地图 嘅 加啲 (["■"," "," "," "," "," ","■"," ","■","■"," ","■","■"," ","■","■","■"," "," "," "," "," "," "," "," ","■"," "," "," ","■\n"])| 啦
| 地图 嘅 加啲 (["■"," ","■"," ","■","■","■"," "," "," "," "," "," "," ","■","■","■","■","■","■"," ","■","■","■","■","■","■","■"," ","■\n"])| 啦
| 地图 嘅 加啲 (["■"," ","■"," "," "," "," ","■","■","■"," ","■","■"," "," "," "," "," "," ","■"," "," "," "," "," "," "," "," "," ","■\n"])| 啦
| 地图 嘅 加啲 (["■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■\n"])| 啦
畀我睇下 |地图| 點樣先??
介紹返 $Display
點部署
|行数| 从 0 行到 20
|列数| 从 0 行到 30
畀我睇下 |地图[行数][列数], end = ""| 點樣先??
到步
到步
搞掂
Display 下 -> || 啦
介紹返 $Clear
點部署
落Order "cls"
搞掂
介紹返 $GameBegin
點部署
介紹返 x 係 1
介紹返 y 係 1
介紹返 p 係 12
介紹返 q 係 29
落操场玩跑步
介紹返 |命令| 係 |畀你啲嘢("请输入行走的方向:")|
如果 |命令 係 "s"| 嘅话 => {
如果 |地图[x + 1][y] != "■"| 嘅话 => {
介紹返 |地图[x][y]| 係 " "
介紹返 |x| 係 |x + 1|
介紹返 |地图[x][y]| 係 "O"
}
Clear 下 -> || 咁啦
Display 下 -> || 咁啦
}
定係 |命令 係 "d"| 嘅话 => {
如果 |地图[x][y + 1] != "■"| 嘅话 => {
介紹返 |地图[x][y]| 係 " "
介紹返 |y| 係 |y + 1|
介紹返 |地图[x][y]| 係 "O"
}
Clear 下 -> || 咁啦
Display 下 -> || 咁啦
}
定係 |命令 係 "w"| 嘅话 => {
如果 |地图[x - 1][y] != "■"| 嘅话 => {
介紹返 |地图[x][y]| 係 " "
介紹返 |x| 係 |x - 1|
介紹返 |地图[x][y]| 係 "O"
}
Clear 下 -> || 啦
Display 下 -> || 啦
}
定係 |命令 係 "a"| 嘅话 => {
如果 |地图[x][y - 1] != "■"| 嘅话 => {
介紹返 |地图[x][y]| 係 " "
介紹返 |y| 係 |y - 1|
介紹返 |地图[x][y]| 係 "O"
}
Clear 下 -> || 啦
Display 下 -> || 啦
}
定係 |命令 係 "q"| 嘅话 => {
收工
}
唔係 嘅话 => {
畀我睇下 "命令错误" 點樣先??
}
玩到 |x 係 p 同埋 y 係 q| 为止
畀我睇下 "成功找到出口" 點樣先??
搞掂
好心 GameBegin 啦