当前位置: 首页>>代码示例>>C#>>正文


C# Field.GetSequence方法代码示例

本文整理汇总了C#中Field.GetSequence方法的典型用法代码示例。如果您正苦于以下问题:C# Field.GetSequence方法的具体用法?C# Field.GetSequence怎么用?C# Field.GetSequence使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Field的用法示例。


在下文中一共展示了Field.GetSequence方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TestLevel2Description

 public void TestLevel2Description()
 {
     var field = new Field(2, 5, 2, 1);
     Assert.That(field.GetSequence(), Is.EqualTo(new[] {6, 7, 8, 9, 10, 5, 4, 3, 2, 1}));
     field = new Field(5, 2, 5, 2);
     Assert.That(field.GetSequence(), Is.EqualTo(new[] {10, 9, 7, 8, 6, 5, 3, 4, 2, 1}));
 }
开发者ID:preuers,项目名称:sp-codeKata,代码行数:7,代码来源:LevelTests.cs

示例2: TestLevel3Description

 public void TestLevel3Description()
 {
     var field = new Field(3, 4, 1, 1, 'S');
     Assert.That(field.GetSequence(), Is.EqualTo(new[] {1, 5, 9, 10, 6, 2, 3, 7, 11, 12, 8, 4}));
     field = new Field(5, 2, 5, 2, 'N');
     Assert.That(field.GetSequence(), Is.EqualTo(new[] {10, 8, 6, 4, 2, 1, 3, 5, 7, 9}));
 }
开发者ID:preuers,项目名称:sp-codeKata,代码行数:7,代码来源:LevelTests.cs

示例3: TestLevel1Description

        public void TestLevel1Description()
        {
            var field = new Field(3, 4);
            Assert.That(field.GetSequence(), Is.EqualTo(new[] {1, 2, 3, 4, 8, 7, 6, 5, 9, 10, 11, 12}));
            var field2 = new Field(2, 5);
            Assert.That(field2.GetSequence(), Is.EqualTo(new[] {1, 2, 3, 4, 5, 10, 9, 8, 7, 6}));

            PrintSequence(new Field(3, 4).GetSequence());
            PrintSequence(new Field(2, 5).GetSequence());
            PrintSequence(new Field(5, 2).GetSequence());
            PrintSequence(new Field(23, 12).GetSequence());
        }
开发者ID:preuers,项目名称:sp-codeKata,代码行数:12,代码来源:LevelTests.cs

示例4: TestLevel2Self

 public void TestLevel2Self()
 {
     var field = new Field(2, 5, 2, 1);
     Assert.That(field.GetSequence(), Is.EqualTo(new[] {6, 7, 8, 9, 10, 5, 4, 3, 2, 1}));
     field = new Field(2, 2, 1, 1);
     Assert.That(field.GetSequence(), Is.EqualTo(new[] {1, 2, 4, 3}));
     field = new Field(2, 2, 1, 2);
     Assert.That(field.GetSequence(), Is.EqualTo(new[] { 2, 1, 3, 4 }));
     field = new Field(2, 2, 2, 1);
     Assert.That(field.GetSequence(), Is.EqualTo(new[] { 3, 4, 2, 1 }));
     field = new Field(2, 2, 2, 2);
     Assert.That(field.GetSequence(), Is.EqualTo(new[] { 4, 3, 1, 2 }));
 }
开发者ID:preuers,项目名称:sp-codeKata,代码行数:13,代码来源:LevelTests.cs

示例5: TestLevel3Self

        public void TestLevel3Self()
        {
            var field = new Field(2, 2, 1, 1, 'O');
            Assert.That(field.GetSequence(), Is.EqualTo(new[] {1, 2, 4, 3}));

            field = new Field(2, 2, 1, 1, 'S');
            Assert.That(field.GetSequence(), Is.EqualTo(new[] { 1, 3, 4, 2 }));

            field = new Field(2, 2, 1, 2, 'S');
            Assert.That(field.GetSequence(), Is.EqualTo(new[] { 2, 4, 3, 1 }));

            field = new Field(2, 2, 1, 2, 'W');
            Assert.That(field.GetSequence(), Is.EqualTo(new[] { 2, 1, 3, 4 }));

            field = new Field(2, 2, 2, 2, 'W');
            Assert.That(field.GetSequence(), Is.EqualTo(new[] { 4, 3, 1, 2 }));

            field = new Field(2, 2, 2, 2, 'N');
            Assert.That(field.GetSequence(), Is.EqualTo(new[] { 4, 2, 1, 3 }));

            field = new Field(2, 2, 2, 1, 'N');
            Assert.That(field.GetSequence(), Is.EqualTo(new[] { 3, 1, 2, 4 }));

            field = new Field(2, 2, 2, 1, 'O');
            Assert.That(field.GetSequence(), Is.EqualTo(new[] { 3, 4, 2, 1 }));
        }
开发者ID:preuers,项目名称:sp-codeKata,代码行数:26,代码来源:LevelTests.cs

示例6: TestLevel5Description

 public void TestLevel5Description()
 {
     var field = new Field(5, 4, 1, 1, 'O', 'S', 2);
     Assert.That(field.GetSequence(), Is.EqualTo(new[] { 1, 5, 2, 6, 3, 7, 4, 8, 16, 12, 15, 11, 14, 10, 13, 9, 17, 18, 19, 20 }));
     field = new Field(5, 4, 4, 1, 'O', 'Z', 2);
     Assert.That(field.GetSequence(), Is.EqualTo(new[] { 13, 17, 14, 18, 15, 19, 16, 20, 8, 4, 7, 3, 6, 2, 5, 1, 9, 10, 11, 12 }));
 }
开发者ID:preuers,项目名称:sp-codeKata,代码行数:7,代码来源:LevelTests.cs

示例7: TestLevel4Self

        public void TestLevel4Self()
        {
            var field = new Field(3, 4, 1, 4, 'W', 'Z');
            Assert.That(field.GetSequence(), Is.EqualTo(new[] {4, 3, 2, 1, 9, 10, 11, 12, 8, 7, 6, 5}));

            field = new Field(3, 4, 1, 1, 'O', 'Z');
            Assert.That(field.GetSequence(), Is.EqualTo(new[] { 1, 2, 3, 4, 12, 11, 10, 9, 5, 6, 7, 8 }));

            field = new Field(3, 4, 3, 4, 'W', 'Z');
            Assert.That(field.GetSequence(), Is.EqualTo(new[] {12, 11, 10, 9, 1, 2, 3, 4, 8, 7, 6, 5}));

            field = new Field(3, 4, 3, 4, 'N', 'Z');
            Assert.That(field.GetSequence(), Is.EqualTo(new[] {12, 8, 4, 1, 5, 9, 11, 7, 3, 2, 6, 10}));
        }
开发者ID:preuers,项目名称:sp-codeKata,代码行数:14,代码来源:LevelTests.cs

示例8: TestLevel7Description

 public void TestLevel7Description()
 {
     var field = new Field(5, 4, 1, 1, 'O', 'S', 3);
     Assert.That(field.GetSequence(), Is.EqualTo(new[] {1, 5, 9, 2, 6, 10, 3, 7, 11, 4, 8, 12, 0, 20, 16, 0, 19, 15, 0, 18, 14, 0, 17, 13}));
     field = new Field(5, 4, 3, 1, 'O', 'Z', 3);
     Assert.That(field.GetSequence(), Is.EqualTo(new[] {9, 13, 17, 10, 14, 18, 11, 15, 19, 12, 16, 20, 8, 4, 0, 7, 3, 0, 6, 2, 0, 5, 1, 0}));
 }
开发者ID:preuers,项目名称:sp-codeKata,代码行数:7,代码来源:LevelTests.cs


注:本文中的Field.GetSequence方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。