Created
April 18, 2013 23:57
-
-
Save mstewartgallus/5417124 to your computer and use it in GitHub Desktop.
SiegeLords Tree
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Node<'self> | |
{ | |
Valid : bool, | |
Parent : Option<&'self Node<'self>> | |
} | |
impl<'self> Node<'self> | |
{ | |
fn new() -> Node<'self> | |
{ | |
Node{Valid : true, Parent : None} | |
} | |
fn spawn_child(parent : &'self Node<'self>) -> Node<'self> | |
{ | |
Node::<'self>{Valid : true, Parent : Some (parent)} | |
} | |
} | |
fn main() | |
{ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment