public Sticker CreateStickerInPosition(ProgressPosition progressPosition, Sticker sticker) { if (CanMoveTo(progressPosition)) { GetProgressCell(progressPosition).Add(sticker); } return(sticker); }
public void Setup(IEnumerable <Player> players) { var firstCell = GetProgressCell(ProgressPosition.First()); foreach (var player in players) { var sticker = new Sticker(player); firstCell.Add(sticker); } }
private void CreateCells(Scale scale, int?wip) { var position = ProgressPosition.First(); while (scale.IsValid(position)) { _progressCells.Add(new ProgressCell(position, wip)); position = position.Next(); } }
public Sticker CreateStickerInProgress(Player player) { var sticker = new Sticker(player); if (CanCreateStickerInProgress()) { GetProgressCell(ProgressPosition.First()).Add(sticker); } return(sticker); }
public ProgressCell(ProgressPosition progressPosition, int?wip) { Wip = wip; _stickers = new List <Sticker>(); Position = progressPosition; }
private ProgressCell GetProgressCell(ProgressPosition position) { return(_progressCells.FirstOrDefault(p => p.Position == position)); }
public bool CanMoveTo(ProgressPosition position) { return(!GetProgressCell(position).IsFull); }
public bool CanCreateStickerInProgress() { return(CanMoveTo(ProgressPosition.First())); }
public IEnumerable <Sticker> GetStickersIn(ProgressPosition progressPosition) { return(GetProgressCell(progressPosition).Stickers); }