using System; using System.Diagnostics; namespace SpaceInvaders { public class ImageNode : SLink { //------------------------------------------------------------------- // FIELDS //------------------------------------------------------------------- private Image pImage; //------------------------------------------------------------------- // CONSTRUCTION //------------------------------------------------------------------- public ImageNode(Image pImg) : base() { Debug.Assert(pImg != null); this.pImage = pImg; } //------------------------------------------------------------------- // PUBLIC METHODS //------------------------------------------------------------------- public Image GetImage() { return this.pImage; } public override void Reset() { this.Clear(); } public override void PrintStats() { Debug.WriteLine("{0} node", this.GetHashCode()); Debug.WriteLine("Image: {0} --> {1}", this.pImage.GetName(), this.GetHashCode()); base.PrintStats(); } //------------------------------------------------------------------- // PRIVATE METHODS //------------------------------------------------------------------- private void Clear() { this.pImage = null; } } //end class } //end namespace