예제 #1
0
파일: HangmanGame.cs 프로젝트: azbyn/oop
 public HangmanGame(IWordGenerator gen, IGraphicsDrawer graphics, int numTries = 8)
 {
     this.gen      = gen;
     this.graphics = graphics;
     this.NumTries = numTries;
     InitWord();
 }
예제 #2
0
        /// <summary>
        /// Adds a GraphicsDrawer to the list.
        /// This will call the Draw method of any class that implements IGraphicsDrawer
        /// </summary>
        /// <param name="drawer"></param>
        public void AddDrawer(IGraphicsDrawer drawer)
        {
            if (drawers.Contains(drawer))
            {
                return;
            }

            drawers.Add(drawer);
        }