//------------------------------------------------------------------------------
function CreateDrag(board, x, y)
{
    //------------------------------------------------------------------------------
    this.setPosition = function(x, y)
    {
        var pos = findPos(this.board.div);

        x = Math.floor((x - pos[0]) / this.tileWidth);
        y = Math.floor((y - pos[1]) / this.tileHeight);
        
        this.board.setValue(x, y, this.value);
    }

    //------------------------------------------------------------------------------
    this.drop = function(x, y)
    {
    }

    //------------------------------------------------------------------------------
    this.board = board;

    this.x = x;
    this.y = y;

    this.tileWidth = 20;
    this.tileHeight = 20;

    this.value = this.board.game.createColor;
    this.board.setValue(x, y, this.value);
}
