コード例 #1
0
        public int GetCol()
        {
            BinaryTreeParser btp = new BinaryTreeParser(Seat.Substring(7, 3), 'L', 'R');

            Col = btp.GetValue();
            return(Col);
        }
コード例 #2
0
        public int GetRow()
        {
            BinaryTreeParser btp = new BinaryTreeParser(Seat.Substring(0, 7), 'F', 'B');

            Row = btp.GetValue();
            return(Row);
        }
コード例 #3
0
        public void BinaryTreeParser_WithLargeValidTree_ShouldReturn44()
        {
            BinaryTreeParser parser = new BinaryTreeParser("FBFBBFF", 'F', 'B');

            Assert.Equal(44, parser.GetValue());
        }
コード例 #4
0
 public TreesController(BinaryTreeParser binaryTreeParser, BinaryTreeSearcher binaryTreeSearcher)
 {
     this.binaryTreeParser = binaryTreeParser;
     this.binaryTreeSearcher = binaryTreeSearcher;
 }
コード例 #5
0
        public void BinaryTreeParser_WithSmallValidTree_ShouldReturn7()
        {
            BinaryTreeParser parser = new BinaryTreeParser("LRL", 'L', 'R');

            Assert.Equal(2, parser.GetValue());
        }