示例#1
0
 public Player(PartFactory partFactory, Arena arena)
 {
     _arena        = arena;
     _linesCleared = 0;
     _partFactory  = partFactory;
     Score         = 0;
     Reset();
 }
示例#2
0
        public Game(Canvas gameCanvas)
        {
            _gameCanvas  = gameCanvas;
            _partFactory = new PartFactory();
            Reset();


            timer          = new DispatcherTimer(DispatcherPriority.Render);
            timer.Interval = TimeSpan.FromMilliseconds(GameSpeed);
            timer.Tick    += Tick;
            timer.Start();
        }