## 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.

# Enums and object challenge 1

Needing a bit of help not quite understanding what it wants me to do.

"In the editor below you have two objects - a struct named Point and a class named Robot. The Robot stores its location as a point instance and contains a move function.

The task of this challenge is to complete the implementation for move. Move takes a parameter of type Direction which is an enumeration listing the possible movement directions.

When you tell the robot to move up (by specifying Direction.Up as the argument), the y coordinate should increase by 1. Similarly moving down means the y coordinate decreases by 1, moving right means the x coordinate increases by 1 and finally left means x decreases by 1."

Depending on the direction of the move, you're going to increment or decrement the robot's location x or y coordinate. Let me know if you need more than that.

Ok finally got it thank you :)

Never mind, I got it:

```  switch direction {
case .Up: location.y += 1
case .Down: location.y -= 1
case .Right: location.x += 1
case .Left: location.x -= 1
}```
```
```switch direction {
case .up: location.y += 1
case .down: location.y -= 1
case .right: location.x += 1
case .left: location.x -= 1
}
```