Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Tyler Dotson
Courses Plus Student 1,740 PointsTrying to create a non visual grid in swift i have some code can some one tell me if this is right?(using (x,y))
I was thinking that too but how do I get the tuples in an array so when i do this in a play ground it gives me vlaues of like,
(.0 1, .1 1), (.0 1, .1 2)
Is that right? what does the .0 and the .1 mean?
var gameArea: [(Int, Int)] = []
for y in 1...10 {
for x in 1...10 {
gameArea.append(x, y)
}
}
gameArea