public bool PutBlock(TetrisBlock block, int x, int y, bool canWin)
    {
        bool b = false;
        for (int ix = 0; ix < block.GetBlockWidth(); ix++) {
            for (int iy = 0; iy < block.GetBlockHeight(); iy++) {
                int magicY = iy ;
                if (direction == Direction.LEFT) {
                    magicY = block.GetBlockHeight()-1-iy;
                }

                if (block.blocks[magicY, ix] != null) {
                    int ny = iy+y;
                    int nx = ix+x;

                    if (ny < 0 || nx < 0 || nx >= blocks.GetLength(1) || ny >= blocks.GetLength(0)) {
                        if (canWin) {
                            b = true;
                            Fail();
                            break;
                        } else {
                            return false;
                        }
                    }
                    blocks[iy+y, ix+x] =
                        block.blocks[magicY, ix];
                }
            }
            if (b) {
                break;
            }
        }

        float xVal = FieldDefinition.instance.height-y-block.GetBlockHeight()+1;
        if (direction == Direction.LEFT) {
            xVal = -(FieldDefinition.instance.height-y);
        }

        if (block.GetComponent<PositionTween>() == null) {
            block.gameObject.AddComponent<PositionTween>();
        }
        block.GetComponent<PositionTween>().TweenTo(
        new Vector3(
            xOffset + xVal,
            x, 0), 0.2f);

        block.GetComponent<PositionTween>().tweenEndCallback = ScanForLines;
        return true;
    }