Exemple #1
0
        public override bool CheckResult(string answer)
        {
            var answers = answer.ToInts();

            if (answers.Length != 3)
            {
                return(false);
            }

            var answerLine = new StraightLine(answers[0], answers[1], answers[2]);

            return(Line.IsNormalTo(answerLine) && answerLine.IsPointOnLine(_point));
        }
Exemple #2
0
        public override bool CheckResult(string answer)
        {
            var answers = answer.ToFractions();

            if (answers.Length != 2)
            {
                return(false);
            }

            var point = new Point(answers[0], answers[1]);

            return(Line.IsPointOnLine(point) && _line.IsPointOnLine(point));
        }