struct Point {
var x, y: Int
func toString() -> String {
return "x = \(x); y = \(y)"
}
mutating func move(right: Int, down: Int) {
x += right
y += down
}
}
var p1 = Point(x: 1, y: 2)
let str1 = p1.toString()
//str1 is "x = 1; y = 2"
p1.move(right: 5, down: -1)
let str2 = p1.toString()
//str2 is "x = 6; y = 1"
print("str1 is \(str1)")
print("str2 is \(str2)")