{"size": 663, "ext": "js", "max_stars_repo_path": "public/js-roguelike-skeleton/manual/index/array-2d/js/manipulate-coord-values.js", "max_stars_repo_name": "THEjoezack/RogueOS", "max_stars_repo_stars_event_min_datetime": "2015-01-29T01:02:32.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-22T19:25:17.000Z", "max_issues_repo_path": "public/js-roguelike-skeleton/manual/index/array-2d/js/manipulate-coord-values.js", "max_issues_repo_name": "THEjoezack/BoxPusher", "max_issues_repo_issues_event_min_datetime": "2017-06-13T14:23:34.000Z", "max_issues_repo_issues_event_max_datetime": "2017-06-15T14:29:11.000Z", "max_forks_repo_path": "public/js-roguelike-skeleton/manual/index/array-2d/js/manipulate-coord-values.js", "max_forks_repo_name": "THEjoezack/BoxPusher", "max_forks_repo_forks_event_min_datetime": "2015-03-21T15:00:04.000Z", "max_forks_repo_forks_event_max_datetime": "2020-10-26T03:03:57.000Z"}
{"max_stars_count": 70, "max_issues_count": 1, "max_forks_count": 14, "avg_line_length": 23.6785714286, "max_line_length": 80, "alphanum_fraction": 0.5791855204}
var mapData = [
    '##########',
    '#........#',
    '#.Z......#',
    '#........#',
    '#........#',
    '##########',
];
var array2d = array2dFromMapData(mapData);
var renderer = rendererFromArray2d(array2d);
var containerEl = document.getElementById('example-container');
// clear contents and append elements created by the game to the DOM
containerEl.innerHTML = '';
containerEl.appendChild(renderer.canvas);

array2d.remove(2, 2);

var aTile = array2d.get(4, 2); // {char: '.', bgColor: '#222', color: '#808080'}
aTile.char = 'a';
aTile.bgColor = '#444';

array2d.set(5, 4, {
    char: 'x',
    color: 'red'
});

// draw to show changes
renderer.draw();