Esempio n. 1
0
 /// <summary>
 /// Generates the Scrabble board cells.
 /// </summary>
 /// <remarks></remarks>
 private void GenerateCells()
 {
     for (int c = 0; c < Cols; c++)
     {
         for (int r = 0; r < Rows; r++)
         {
             if (LetterPremiumLayout[r][c] == '+')
             {
                 Cells[c, r] = new Cell(CellType.DoubleLetter);
             }
             else if (LetterPremiumLayout[r][c] == '*')
             {
                 Cells[c, r] = new Cell(CellType.TripleLetter);
             }
             else if (WordPremiumLayout[r][c] == '+')
             {
                 Cells[c, r] = new Cell(CellType.DoubleWord);
             }
             else if (WordPremiumLayout[r][c] == '*')
             {
                 Cells[c, r] = new Cell(CellType.TripleWord);
             }
             else
             {
                 Cells[c, r] = new Cell(CellType.SingleLetter);
             }
         }
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Places a tile in the specified cell.
 /// </summary>
 /// <param name="player">The player.</param>
 /// <param name="letter">The letter.</param>
 /// <param name="cell">The cell.</param>
 /// <remarks></remarks>
 public void PlaceTile(Player player, string letter, Cell cell)
 {
     cell.Place(new Tile(letter, player));
 }