public void Place(Tile tile, int p1, int p2) { if (IsEmpty(p1, p2)) { Spaces[p1, p2] = tile; } else { throw new InvalidOperationException(); } }
public void Place(Tile tile, int x, int y) { if (Player.Hand.Contains(tile)) { Board.Place(tile, x, y); Player.Hand.Remove(tile); } else { throw new InvalidOperationException(); } }
public Board(int size) { Spaces = new Tile[size,size]; Words = new List<string>(); }
public Tile GetTile() { Tile tile =new Tile(GetRandomLetters()); return tile; }
static void printTile(Tile tile) { Console.WriteLine(" {0}", tile.Letters[(int)TilePosition.Top]); Console.WriteLine(" {0} [ {1} ] {2} ", tile.Letters[(int)TilePosition.Left],tile.Letters[(int)TilePosition.Center], tile.Letters[(int)TilePosition.Right]); Console.WriteLine(" {0}", tile.Letters[(int)TilePosition.Bottom]); }