Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def addBorder(picture)
- array = Array.new
- x = 0
- string = ""
- y = 1
- while (x < picture[0].length + 2)
- string = string + "*"
- x = x + 1
- end
- array[0] = string
- x = 0
- while (x < picture.length)
- array[y] = "*" + picture[x] + "*"
- x = x + 1
- y = y + 1
- end
- array[y] = string
- return array
- end
Advertisement
Add Comment
Please, Sign In to add comment