public void PlayFieldChangeEventArgsTestGetPlayFieldSize()
 {
     Playfield playfield = Playfield.Instance;
     playfield.SetFieldSize(10);
     PlayfieldChangedEventArgs pl = new PlayfieldChangedEventArgs(playfield);
     Assert.AreEqual(pl.PlayfieldSize, 10);
 }
        public void PlayFieldChangeEventArgsTestIfAcceptNull()
        {
            string message = string.Empty;

            Playfield playfield = Playfield.Instance;
            PlayfieldChangedEventArgs pl = new PlayfieldChangedEventArgs(null);
        }
Exemple #3
0
 /// <summary>
 /// Register event for playfield changed.
 /// </summary>
 /// <param name="e">CellEventArgs e.</param>
 protected virtual void OnPlayfieldChanged(PlayfieldChangedEventArgs e)
 {
     if (this.PlayfieldChanged != null)
     {
         this.PlayfieldChanged(this, e);
     }
 }
Exemple #4
0
 /// <summary>
 /// Called when a new <see cref="Playfield"/> object is inserted to the attached GameEngine object.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="PlayfieldChangedEventArgs" /> instance containing the event data.</param>
 protected virtual void OnPlayfieldChangedHandler(object sender, PlayfieldChangedEventArgs e)
 {
     this.CellViews = this.CreateCellViews(e.NewPlayField);
     this.DrawAll();
 }