package ru.m.puzzlez.view;

import haxework.view.group.VGroupView;
import openfl.utils.Assets;
import ru.m.puzzlez.core.Game;
import ru.m.puzzlez.core.IGame;
import ru.m.puzzlez.render.IRender;

@:template class PuzzlezAppView extends VGroupView {

    @:view private var render:IRender;
    private var game:IGame;

    public function new() {
        super();
    }

    public function start() {
        var image = Assets.getBitmapData('resources/warty-final-ubuntu.png');
        game = new Game({image:image, grid: {width: 7, height: 5}});
        render.draw(game.state);
    }
}
