Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed C# Objects!
You have completed C# Objects!
Preview
Hide implementation details and make objects easy to use with encapsulation.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
We can represent the path in code
as an array of map locations.
0:00
Starting at index zero in the array,
0:00
invaders can move down the path by
moving to the next index in the array.
0:02
To start, let's create an array
of map locations here in Main.
0:08
This will create a path that moves
from the left to right across
0:11
the middle of the map.
0:14
So we've already got our
mapLocation variable here.
0:16
So let's take this out and
put our square brackets here.
0:20
We'll call it path, and
opening closing curly braces,
0:24
we'll use the shortcut method here.
0:28
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up