using System; using System.Diagnostics; namespace SpaceInvaders { public abstract class SLink : Node { //------------------------------------------------------------------- // FIELDS //------------------------------------------------------------------- public SLink pNext; //------------------------------------------------------------------- // CONSTRUCTION //------------------------------------------------------------------- public SLink() { this.Clear(); } //------------------------------------------------------------------- // PUBLIC METHODS //------------------------------------------------------------------- public override void Reset() { this.Clear(); } public override void PrintStats() { if (this.pNext == null) { Debug.WriteLine(" next: null"); } else { Node pTmp = (Node)this.pNext; Debug.WriteLine(" next: {0} ({1})", pTmp.GetName(), pTmp.GetHashCode()); } } //------------------------------------------------------------------- // PRIVATE METHODS //------------------------------------------------------------------- private void Clear() { this.pNext = null; } } //end class } //end namespace