-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
lesson-19-creating-arrays.pot
205 lines (181 loc) · 6.67 KB
/
lesson-19-creating-arrays.pot
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
# Translations template for Learn GDScript From Zero.
# Copyright (C) 2024 GDQuest
# This file is distributed under the same license as the Learn GDScript From
# Zero project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2024.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Learn GDScript From Zero \n"
"Report-Msgid-Bugs-To: https://github.com/GDQuest/learn-gdscript\n"
"POT-Creation-Date: 2024-12-12 14:39+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.10.1\n"
#: course/lesson-19-creating-arrays/lesson.tres:13
msgid ""
"The [code]range()[/code] function we saw in the previous lesson outputs a"
" list of numbers. For example, calling [code]range(3)[/code] produces the"
" list of numbers [code][0, 1, 2][/code]."
msgstr ""
#: course/lesson-19-creating-arrays/lesson.tres:33
msgid ""
"A list of values, numbers or otherwise, has a precise name in code: we "
"call it an [i]array[/i]. So we can say calling the [code]range()[/code] "
"function produces an [i]array[/i] of numbers.\n"
"\n"
"We could directly write and use that array inside our [code]for[/code] "
"loop instead of the [code]range()[/code] function. You can run the next "
"function step-by-step to see how it works."
msgstr ""
#: course/lesson-19-creating-arrays/lesson.tres:55
msgid ""
"As you can see, the code still works the same. Notice that when we create"
" a [code]for[/code] loop, we also create a local variable to which the "
"loop assigns one value per iteration. Above, we named it "
"[code]number[/code] because the array we loop over contains three numbers"
" (0, 1, and 2).\n"
"\n"
"But we could name it anything we'd like!"
msgstr ""
#: course/lesson-19-creating-arrays/lesson.tres:77
msgid ""
"If we \"unwrap\" the [code]for[/code] loop above, we'd get the following "
"code with the exact same behaviour:"
msgstr ""
#: course/lesson-19-creating-arrays/lesson.tres:95
msgid "The syntax of arrays"
msgstr ""
#: course/lesson-19-creating-arrays/lesson.tres:97
msgid "We write arrays this way in GDScript."
msgstr ""
#: course/lesson-19-creating-arrays/lesson.tres:117
msgid ""
"You start with an opening square bracket. Then, you write comma-separated"
" values that compose the array. Finally, you need a closing square "
"bracket to complete the array.\n"
"\n"
"Here are a couple of valid arrays. Notice how you can mix values, and how"
" they don't need to follow one another."
msgstr ""
#: course/lesson-19-creating-arrays/lesson.tres:139
msgid ""
"Because arrays themselves are a value type, just like numbers or "
"[code]Vector2[/code], we can assign arrays to variables to reaccess them "
"later.\n"
"\n"
"That'll come in handy in the next lesson, where we'll use those variables"
" in loops."
msgstr ""
#: course/lesson-19-creating-arrays/lesson.tres:161
msgid "But first, let's see [i]when[/i] you'd use an array."
msgstr ""
#: course/lesson-19-creating-arrays/lesson.tres:169
msgid "When you use arrays"
msgstr ""
#: course/lesson-19-creating-arrays/lesson.tres:171
msgid ""
"In computer programming, we use arrays [i]all the time[/i].\n"
"\n"
"Precisely, you'll use them whenever you need to store a [i]list of "
"things[/i].\n"
"\n"
"You always need lists of things in games:\n"
"\n"
"- The player's party in an RPG.\n"
"- The items in the player's inventory.\n"
"- The high scores in an arcade game.\n"
"- The objects in the game world.\n"
"\n"
"All of those and many more rely on arrays."
msgstr ""
#: course/lesson-19-creating-arrays/lesson.tres:190
msgid "Using arrays to follow a path"
msgstr ""
#: course/lesson-19-creating-arrays/lesson.tres:192
msgid ""
"Let's look at a widespread use of arrays in games: finding and following "
"a path.\n"
"\n"
"In games, you need allies or monsters to find their way to their target, "
"whether it's the player or some point of interest.\n"
"\n"
"To achieve that, we use [i]pathfinding algorithms[/i]. As the name "
"suggests, those algorithms find the path between two points and allow AIs"
" to traverse the game."
msgstr ""
#: course/lesson-19-creating-arrays/lesson.tres:216
msgid ""
"Many of those algorithms use arrays of [code]Vector2[/code] coordinates "
"to represent the path.\n"
"\n"
"Take this turtle pet. It wants to follow the robot, but there are rocks "
"in the way.\n"
"\n"
"How can we tell it where to walk to reach the robot? With an array!"
msgstr ""
#: course/lesson-19-creating-arrays/lesson.tres:250
msgid ""
"Every value in the array is a [code]Vector2[/code] and represents a cell "
"the turtle needs to walk through.\n"
"\n"
"Together, all the values in the array represent a path we can draw."
msgstr ""
#: course/lesson-19-creating-arrays/lesson.tres:272
msgid ""
"In upcoming lessons, you will see how we can use arrays to store player "
"inventories or design attack combos.\n"
"\n"
"For now, let's practice creating arrays."
msgstr ""
#: course/lesson-19-creating-arrays/lesson.tres:282
msgid "Walking to the robot"
msgstr ""
#: course/lesson-19-creating-arrays/lesson.tres:283
msgid ""
"The turtle wants to meet the robot! But it cannot find it on its own.\n"
"\n"
"Fill the [code]turtle_path[/code] array with [code]Vector2[/code] "
"coordinates indicating where the turtle should move to avoid the "
"obstacles and arrive safely to the robot.\n"
"\n"
"The turtle can move up, down, left, or right. It cannot move diagonally.\n"
"\n"
"We recommend copying and pasting to fill the array with comma-separated "
"[code]Vector2[/code] values quickly."
msgstr ""
#: course/lesson-19-creating-arrays/lesson.tres:298
msgid ""
"Help the turtle find its way to the robot! Give it a path to follow to "
"reach the robot."
msgstr ""
#: course/lesson-19-creating-arrays/lesson.tres:303
msgid "Selecting units"
msgstr ""
#: course/lesson-19-creating-arrays/lesson.tres:304
msgid ""
"In this tactical game, the player and computer can select multiple units "
"at once. You need to call the [code]select_units()[/code] function and "
"pass it an array of [code]Vector2[/code] coordinates to know which units "
"to select.\n"
"\n"
"Each [code]Vector2[/code] in the array represents a cell with a unit.\n"
"\n"
"You can pass arrays in function calls as arguments. As an array is a "
"value type the computer recognizes, you can pass the whole array as a "
"single function argument.\n"
"\n"
"Select all units on the board by passing the correct array to the "
"[code]select_units()[/code] function."
msgstr ""
#: course/lesson-19-creating-arrays/lesson.tres:320
msgid "Write an array to select all units on the board in this strategy game."
msgstr ""
#: course/lesson-19-creating-arrays/lesson.tres:324
msgid "Creating arrays"
msgstr ""