Exemplo n.º 1
0
        /// <summary>
        /// Fills the map of shadow items based on the state of markups.
        /// </summary>
        /// <param name="boardSize">Size of game board.</param>
        /// <param name="kind">Kind of sequence markup. (Letter, Number)</param>
        /// <returns>Map of shadow items.</returns>
        public string[,] FillSequenceShadowMap(GameBoardSize boardSize, SequenceMarkupKind kind)
        {
            string shadow;

            string[,] shadows = new string[boardSize.Width, boardSize.Height];
            if (kind == SequenceMarkupKind.Letter)
            {
                shadow = GetSmallestUnusedLetter().ToString();
            }
            else
            {
                shadow = GetSmallestUnusedNumber().ToString();
            }

            for (int x = 0; x < boardSize.Width; x++)
            {
                for (int y = 0; y < boardSize.Height; y++)
                {
                    shadows[x, y] = shadow;
                }
            }

            foreach (var label in GetMarkups <Label>())
            {
                shadows[label.Position.X, label.Position.Y] = "r";
            }

            return(shadows);
        }
Exemplo n.º 2
0
 public SequenceMarkupTool(SequenceMarkupKind kind)
 {
     SequenceMarkup = kind;
 }