diff --git a/Shared/TreeScene.cs b/Shared/TreeScene.cs index 685cd88..664b4e6 100644 --- a/Shared/TreeScene.cs +++ b/Shared/TreeScene.cs @@ -53,7 +53,20 @@ namespace SemiColinGames { public Vector2 Position; public TreeNode(float orientation, float length, float inWidth, float outWidth) : - this(orientation, length, inWidth, outWidth, new List()) {} + this(orientation, length, inWidth, outWidth, new List()) { + } + + public TreeNode(float orientation, float length, float inWidth, float outWidth, TreeNode child) : + this(orientation, length, inWidth, outWidth, new List() { child }) { + } + + public TreeNode(float orientation, float length, float inWidth, float outWidth, TreeNode child1, TreeNode child2) : + this(orientation, length, inWidth, outWidth, new List() { child1, child2 }) { + } + + public TreeNode(float orientation, float length, float inWidth, float outWidth, TreeNode child1, TreeNode child2, TreeNode child3) : + this(orientation, length, inWidth, outWidth, new List() { child1, child2, child3 }) { + } public TreeNode(float orientation, float length, float inWidth, float outWidth, List children) { Orientation = orientation; @@ -67,21 +80,18 @@ namespace SemiColinGames { public void Draw(bool isRunningSlowly, IWorld iworld, bool paused) { var tree = - new TreeNode(0.0f, 100, 10, 6, new List() { - new TreeNode(-0.1f, 100, 10, 6, new List() { - new TreeNode(-0.1f, 100, 10, 6, new List() { - new TreeNode(-0.3f, 100, 6, 4, new List() { - new TreeNode(-0.1f, 100, 6, 4, new List() { + new TreeNode(-0.2f, 100, 10, 6, + new TreeNode(-0.2f, 100, 10, 6, + new TreeNode(-0.2f, 100, 10, 6, + new TreeNode(-0.3f, 100, 6, 4, + new TreeNode(-0.1f, 100, 6, 4, new TreeNode(-0.3f, 150, 4, 2), new TreeNode(0.2f, 200, 4, 2), - new TreeNode(0.5f, 100, 4, 2) - })}), - new TreeNode(0.5f, 100, 6, 4, new List() { - new TreeNode(-0.1f, 100, 6, 4, new List() { + new TreeNode(0.5f, 100, 4, 2))), + new TreeNode(0.5f, 100, 6, 4, + new TreeNode(-0.1f, 100, 6, 4, new TreeNode(-0.1f, 150, 4, 2), - new TreeNode(0.2f, 200, 4, 2) - })}), - })})}); + new TreeNode(0.2f, 200, 4, 2)))))); graphics.Clear(backgroundColor);