"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var ava_1 = require("ava");
var cursor_1 = require("./cursor");
var updateScene_1 = require("./updateScene");
ava_1.default('draw canvas', function (t) {
    var sky = {
        index: 1,
        placement: {
            type: 'Sky'
        },
        src: '',
        author: {
            name: ''
        }
    };
    var cursor = new cursor_1.default(1, 0, 'pen', [[sky], [sky]], 1);
    var origin = createScene([
        [
            [0, 0, 0],
            [0, 0, 0],
            [0, 0, 0]
        ]
    ]);
    var expect = createScene([
        [
            [0, 1, 0],
            [0, 1, 0],
            [0, 0, 0]
        ]
    ]);
    var result = updateScene_1.updateScene(origin, cursor);
    t.not(origin, result, 'draw関数は Immutable でなければならない');
    t.is(result.map.tables.length, expect.map.tables.length);
    t.deepEqual(result.map.tables, expect.map.tables);
});
function createScene(tables) {
    return {
        debug: false,
        map: {
            base: -1,
            tables: tables,
            squares: []
        },
        screen: {
            width: 480,
            height: 320
        }
    };
}
//# sourceMappingURL=updateScene.spec.js.map