Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- File.foreach(map) {|line|
- line = line.chomp
- @sizeofarray = line.size unless @sizeofarray
- @map_array = Array.new(@sizeofarray) {Array.new(@sizeofarray) {""}} unless @map_array
- line.each_char do |character|
- @map_array[rows][collumns] = character
- rows += 1
- end
- collumns += 1
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement