예제 #1
0
파일: Hex.cs 프로젝트: lgallucci/HiveOnline
        static public void TestDoubledRoundtrip()
        {
            Hex          a = new Hex(3, 4, -7);
            DoubledCoord b = new DoubledCoord(1, -3);

            Tests.EqualHex("conversion_roundtrip doubled-q", a, DoubledCoord.QdoubledFromCube(a).QdoubledToCube());
            Tests.EqualDoubledcoord("conversion_roundtrip doubled-q", b, DoubledCoord.QdoubledFromCube(b.QdoubledToCube()));
            Tests.EqualHex("conversion_roundtrip doubled-r", a, DoubledCoord.RdoubledFromCube(a).RdoubledToCube());
            Tests.EqualDoubledcoord("conversion_roundtrip doubled-r", b, DoubledCoord.RdoubledFromCube(b.RdoubledToCube()));
        }
예제 #2
0
파일: Hex.cs 프로젝트: lgallucci/HiveOnline
 static public void TestDoubledFromCube()
 {
     Tests.EqualDoubledcoord("doubled_from_cube doubled-q", new DoubledCoord(1, 5), DoubledCoord.QdoubledFromCube(new Hex(1, 2, -3)));
     Tests.EqualDoubledcoord("doubled_from_cube doubled-r", new DoubledCoord(4, 2), DoubledCoord.RdoubledFromCube(new Hex(1, 2, -3)));
 }