public bool KiemTraThang() { foreach (Oco oco in DanhsachCoDaDanh) { if (DuyetDoc(oco.Dong, oco.Cot, oco.Sohuu)) { kt = oco.Sohuu == 1 ? KT.playes1 : KT.playes2; return(true); } if (DuyetNgang(oco.Dong, oco.Cot, oco.Sohuu)) { kt = oco.Sohuu == 1 ? KT.playes1 : KT.playes2; return(true); } if (DuyetDuongCheoChinh(oco.Dong, oco.Cot, oco.Sohuu)) { kt = oco.Sohuu == 1 ? KT.playes1 : KT.playes2; return(true); } if (DuyetDuongCheoPhu(oco.Dong, oco.Cot, oco.Sohuu)) { kt = oco.Sohuu == 1 ? KT.playes1 : KT.playes2; return(true); } } if (DanhsachCoDaDanh.Count == 9) { kt = KT.Hoa; return(true); } return(false); }
/// <summary> /// 查找节点 /// </summary> /// <param name="node"></param> /// <param name="value"></param> internal SearchNode(ref Node node, out VT value) { HashCode = node.HashCode; Key = node.Key; Index = int.MaxValue; value = node.Value; }
/// <summary> /// 设置数据 /// </summary> /// <param name="node"></param> /// <param name="value"></param> /// <param name="source"></param> /// <param name="next"></param> internal void Set(ref SearchNode node, VT value, uint source, int next) { HashCode = node.HashCode; Key = node.Key; Value = value; Source = source; Next = next; }
/// <summary> /// 设置数据 /// </summary> /// <param name="node"></param> /// <param name="value"></param> /// <param name="source"></param> internal void Set(ref SearchNode node, VT value, uint source) { HashCode = node.HashCode; Key = node.Key; Value = value; Source = source; Next = int.MaxValue; }
public Token(string identifier, byte column, int line) { Column = column; Line = line; if (Keyword.Find(identifier, out KT keywordType)) { Type = TT.Keyword; KeywordType = keywordType; } else { Type = TT.Identifier; IdentifierStringId = strings.Count; strings.Add(identifier); } }
public Token(TT type, string identifier, byte column, int line) { HIDebug.Assert(type == TT.Identifier || type == TT.String); Type = type; Column = column; Line = line; if (type == TT.Identifier && Keyword.Find(identifier, out KT keywordType)) { Type = TT.Keyword; KeywordType = keywordType; } else { StringId = strings.Count; strings.Add(identifier); } }
public static bool Find(string identifier, out KT keywordType) => keywords.TryGetValue(identifier, out keywordType);
public KT(KT kt) { _kt = kt; }
public F(KT kt) { }
/// <summary> /// 查找节点 /// </summary> /// <param name="key"></param> internal SearchNode(ref KT key) { HashCode = key.GetHashCode() & int.MaxValue; Key = key; Index = int.MaxValue; }
internal void Clear() { Key = AutoCSer.Common.GetDefault <KT>(); Value = AutoCSer.Common.GetDefault <VT>(); }
public CacheItem(KT key, DateTime sign, VT data) { this.key = key; this.sign = sign; this.data = data; }