I'm working on a program that will include a very basic "map editor" of a sorts. (The "map" is actually a 2D integer array of 1's and 0's, 1 = wall, 0 = open space). And I want to add a tool to draw a line of 1's or 0's horizontally or vertically and currently I get a user to input a start coordinate, an end coordinate, and a tile type (1 or 0). However when it comes to iterating through this array and changing the contents of the elements, only the first (starting) coordinate is changed. All others stay unchanged.