GitList
Repositories
Help
Report an Issue
boggleNet
Code
Commits
Branches
Tags
Search
Tree:
645335e
Branches
Tags
master
boggleNet
Tile.cs
Revert "Removing byte order mark in file using for f in `ls`; do awk '{if(NR==1)sub(/^\xef\xbb\xbf/,"");print}' $f > $f; done"
Dev Ghai
commited
645335e
at 2013-09-23 06:37:32
Tile.cs
Blame
History
Raw
namespace Boggle { public class Tile { //declaring readonly as these values will never be modified once set and compiler has ways to optimize for this. private readonly int _X; /// <summary> /// X co-ordinate of the tile in the board array. /// This is a read only property. /// </summary> public int X { get { return _X; } } /// <summary> /// Y co-ordinate of the tile in the board array. /// This is a read only property. /// </summar private readonly int _Y; public int Y { get { return _Y; } } /// <summary> /// The alphabet contained in the tile. It can be any valid letter or 'QU'. /// This is a read only property. /// </summary> private readonly string _Alphabet; public string Alphabet { get { return _Alphabet; } } /// <summary> /// Tells whether this tile has been visited or not during recursion. /// </summary> public bool IsVisited { get; set; } public Tile(int x, int y, string alphabet) { _X = x; _Y = y; _Alphabet = alphabet; IsVisited = false; } /// <summary> /// Copy constructor to use when using threads. /// </summary> /// <param name="t"></param> public Tile(Tile t) { _X = t._X; _Y = t._Y; _Alphabet = t._Alphabet; IsVisited = t.IsVisited; } } }