const Block = require('./block');
const typeToConfig = require('./type-to-config');

class Board {
	constructor() {
		this.height = 3;
		this.width = 3;
		this.blocks = [
			[null, null, null],
			[null, null, null],
			[null, null, null],
		];
	}

	getBlock(x, y) {
		return this.blocks[y][x];
	}

	placeBlock(x, y, type) {
		const config = typeToConfig[type];
		config.x = x;
		config.y = y;
		const block = new Block(config);
		this.blocks[y][x] = block;
	}
}

module.exports = Board;

@@ -238,16 +238,281 @@
 %5D,%0A%09%09%5D;%0A
+%09%09this.inputBlockX = 1;%0A%09%09this.inputBlockY = 0;%0A%09%09this.outputBlockX = 1;%0A%09%09this.outputBlockY = 2;%0A%09%7D%0A%0A%09get inputBlock() %7B%0A%09%09return this.blocks%5Bthis.inputBlockY%5D%5Bthis.inputBlockX%5D;%0A%09%7D%0A%0A%09get outputBlock() %7B%0A%09%09return this.blocks%5Bthis.outputBlockY%5D%5Bthis.outputBlockX%5D;%0A
 %09%7D%0A%0A%09get

Define input and output block information