/// <summary> /// Method to set Join object with previous Bone /// </summary> /// <param name="previous">Join object that goes after current</param> public void setPrev(Join previous) { prev = previous; }
/// <summary> /// Constructor with all parameters to be set /// </summary> /// <param name="bone">Bone object itself</param> /// <param name="previous">Join object with previous bone</param> /// <param name="next">Join object with next bone</param> public Join(Bone bone, Join previous, Join next) { this.bone = bone; this.next = next; prev = previous; }
/// <summary> /// Method to set Join object with next Bone /// </summary> /// <param name="next">Join object that goes before current</param> public void setNext(Join next) { this.next = next; }
/// <summary> /// Constructor that receives just Bone object as a parameter /// </summary> /// <param name="b">Bone object</param> public Join(Bone b) { bone = b; next = null; prev = null; }
/// <summary> /// Basic constructor without parameters /// </summary> public Join() { bone = null; next = null; prev = null; }
/// <summary> /// Method to set snake's tail /// </summary> /// <param name="h">The last, tail Join</param> public void setTail(Join t) { tail = t; }
/// <summary> /// Method to set snake's head /// </summary> /// <param name="h">The first, head Join</param> public void setHead(Join h) { head = h; }
/// <summary> /// Basic constructor without variables /// </summary> public Snake() { head = null; tail = null; length = 0; }