Ejemplo n.º 1
0
 public Game(int width, int length, Action <int> die, Action <Bitmap> graphics)
 {
     field         = new Field(width, length, SkinsSnake.Rand());
     StartLength   = length;
     field.Die    += DieSnake;
     field.Eat    += Eat;
     Death         = die;
     Graphics      = graphics;
     this.graphics = new GraphicsGame(field, Graphics);
 }
Ejemplo n.º 2
0
 public void Reset()
 {
     Stop();
     graphics.StopRotate();
     graphics.StopMove();
     field.Restart(StartLength);
     field.NewSnakeSkin(SkinsSnake.Rand());
     Delayed    = 0;
     CountMoves = 0;
     historyMoves.Clear();
     ChangeLength(SnakeLength);
 }