예제 #1
0
        public bool Equals(OpeningFact that)
        {
            if (that == null)
            {
                return(false);
            }

            return(this.Value.Equals(that.Value));
        }
예제 #2
0
        public override bool Implies(IFact <ChessGame> that)
        {
            if (that == null)
            {
                return(false);
            }

            OpeningFact fact = that as OpeningFact;

            return(Implies(fact));
        }
예제 #3
0
 public bool Implies(OpeningFact that)
 {
     if (that == null)
     {
         return(false);
     }
     if (that.Value == "Gambit")
     {
         return(this.Value.Contains(that.Value));
     }
     return(this.Value.StartsWith(that.Value));
 }
예제 #4
0
        public override bool Equals(Object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            OpeningFact fact = obj as OpeningFact;

            if (fact == null)
            {
                return(false);
            }
            else
            {
                return(Equals(fact));
            }
        }
예제 #5
0
        public override bool IsTrue(ChessGame game)
        {
            var gameOpeningFact = new OpeningFact(game.Opening);

            return(gameOpeningFact.Implies(this));
        }