Exemplo n.º 1
0
        public Sticker CreateStickerInPosition(ProgressPosition progressPosition, Sticker sticker)
        {
            if (CanMoveTo(progressPosition))
            {
                GetProgressCell(progressPosition).Add(sticker);
            }

            return(sticker);
        }
Exemplo n.º 2
0
        public void Setup(IEnumerable <Player> players)
        {
            var firstCell = GetProgressCell(ProgressPosition.First());

            foreach (var player in players)
            {
                var sticker = new Sticker(player);
                firstCell.Add(sticker);
            }
        }
Exemplo n.º 3
0
        private void CreateCells(Scale scale, int?wip)
        {
            var position = ProgressPosition.First();

            while (scale.IsValid(position))
            {
                _progressCells.Add(new ProgressCell(position, wip));
                position = position.Next();
            }
        }
Exemplo n.º 4
0
        public Sticker CreateStickerInProgress(Player player)
        {
            var sticker = new Sticker(player);

            if (CanCreateStickerInProgress())
            {
                GetProgressCell(ProgressPosition.First()).Add(sticker);
            }

            return(sticker);
        }
Exemplo n.º 5
0
 public ProgressCell(ProgressPosition progressPosition, int?wip)
 {
     Wip       = wip;
     _stickers = new List <Sticker>();
     Position  = progressPosition;
 }
Exemplo n.º 6
0
 private ProgressCell GetProgressCell(ProgressPosition position)
 {
     return(_progressCells.FirstOrDefault(p => p.Position == position));
 }
Exemplo n.º 7
0
 public bool CanMoveTo(ProgressPosition position)
 {
     return(!GetProgressCell(position).IsFull);
 }
Exemplo n.º 8
0
 public bool CanCreateStickerInProgress()
 {
     return(CanMoveTo(ProgressPosition.First()));
 }
Exemplo n.º 9
0
 public IEnumerable <Sticker> GetStickersIn(ProgressPosition progressPosition)
 {
     return(GetProgressCell(progressPosition).Stickers);
 }