public PlayerBoardCP(CountdownGameContainer gameContainer, ISkiaSharpGameBoard thisElement, CountdownPlayerItem thisPlayer) : base(gameContainer.Resolver, thisElement)
 {
     _gameContainer = gameContainer;
     _thisPlayer    = thisPlayer; //i think here this time.  if i am wrong, rethink
     if (_gameContainer.GetNumberList == null)
     {
         throw new BasicBlankException("Nobody is handling get number list.  Rethink");
     }
     if (thisPlayer.NumberList.Count == 0)
     {
         thisPlayer.NumberList = _gameContainer.GetNumberList.Invoke();
     }
 }
Ejemplo n.º 2
0
        public void LoadBoard(CountdownPlayerItem thisPlayer, CountdownGameContainer gameContainer)
        {
            _privateBoard = new PlayerBoardCP(gameContainer, Element, thisPlayer); //hopefully no problem.
            _aggregator   = gameContainer.Aggregator;
            SKSize thisSize = _privateBoard.SuggestedSize();

            WidthRequest      = thisSize.Width;
            VerticalOptions   = LayoutOptions.Start;
            HorizontalOptions = LayoutOptions.Start;
            HeightRequest     = thisSize.Height;
            EventAggregator thisT = Resolve <EventAggregator>();

            thisT.Subscribe(this, EnumRepaintCategories.FromSkiasharpboard.ToString());
            Content    = Element;
            _hasLoaded = true;
            Element.InvalidateSurface(); //i think
        }
Ejemplo n.º 3
0
        public void LoadBoard(CountdownPlayerItem thisPlayer, CountdownGameContainer gameContainer)
        {
            _privateBoard = new PlayerBoardCP(gameContainer, Element, thisPlayer); //hopefully no problem.
            SKSize thisSize = _privateBoard.SuggestedSize();

            Width               = thisSize.Width;
            Height              = thisSize.Height;
            _aggregator         = gameContainer.Aggregator;
            HorizontalAlignment = HorizontalAlignment.Left;
            VerticalAlignment   = VerticalAlignment.Top;
            EventAggregator thisT = Resolve <EventAggregator>();

            thisT.Subscribe(this, EnumRepaintCategories.FromSkiasharpboard.ToString()); //i think this is it.  if i am wrong, rethink
            Content    = Element;
            _hasLoaded = true;
            Element.InvalidateVisual(); //i think
        }
Ejemplo n.º 4
0
 public void UpdateBoard(CountdownPlayerItem ThisPlayer)
 {
     _privateBoard !.UpdatePlayer(ThisPlayer);
 }
 public void UpdatePlayer(CountdownPlayerItem thisPlayer)
 {
     _thisPlayer = thisPlayer;
     _thisList.Clear();
     CreateSpaces(); //try to create spaces again.
 }