@Test public void testTwoPairTwosAndFives() { int c1 = FastEval.encode(0, FastEval.CLUBS), c2 = FastEval.encode(0, FastEval.DIAMONDS), c3 = FastEval.encode(3, FastEval.HEARTS), c4 = FastEval.encode(3, FastEval.SPADES), c5 = FastEval.encode(8, FastEval.CLUBS), c6 = FastEval.encode(4, FastEval.HEARTS), c7 = FastEval.encode(6, FastEval.DIAMONDS); System.out.println(FastEval.eval5(c1, c2, c3, c4, c5)); System.out.println(FastEval.eval6(c1, c2, c3, c4, c5, c6)); System.out.println(FastEval.eval7(c1, c2, c3, c4, c5, c6, c7)); System.out.println( FastEval.fromBrecher5(FastEval.toBrecher5(FastEval.eval5(c1, c2, c3, c4, c5)))); System.out.println( FastEval.fromBrecher6(FastEval.toBrecher6(FastEval.eval6(c1, c2, c3, c4, c5, c6)))); System.out.println( FastEval.fromBrecher7(FastEval.toBrecher7(FastEval.eval7(c1, c2, c3, c4, c5, c6, c7)))); assertEquals( 4176, FastEval.fromBrecher5(FastEval.toBrecher5(FastEval.eval5(c1, c2, c3, c4, c5)))); assertEquals( 2941, FastEval.fromBrecher6(FastEval.toBrecher6(FastEval.eval6(c1, c2, c3, c4, c5, c6)))); assertEquals( 1906, FastEval.fromBrecher7(FastEval.toBrecher7(FastEval.eval7(c1, c2, c3, c4, c5, c6, c7)))); }
@Test public void testTwoPairAcesAndKings() { int c1 = FastEval.encode(11, FastEval.CLUBS), c2 = FastEval.encode(11, FastEval.DIAMONDS), c3 = FastEval.encode(12, FastEval.HEARTS), c4 = FastEval.encode(12, FastEval.SPADES), c5 = FastEval.encode(9, FastEval.CLUBS), c6 = FastEval.encode(8, FastEval.HEARTS), c7 = FastEval.encode(7, FastEval.DIAMONDS); assertEquals( 4993, FastEval.fromBrecher5(FastEval.toBrecher5(FastEval.eval5(c1, c2, c3, c4, c5)))); assertEquals( 3749, FastEval.fromBrecher6(FastEval.toBrecher6(FastEval.eval6(c1, c2, c3, c4, c5, c6)))); assertEquals( 2638, FastEval.fromBrecher7(FastEval.toBrecher7(FastEval.eval7(c1, c2, c3, c4, c5, c6, c7)))); }
@Test public void testTwoPairTwosAndEights() { int c1 = FastEval.encode(0, FastEval.CLUBS), c2 = FastEval.encode(0, FastEval.DIAMONDS), c3 = FastEval.encode(6, FastEval.HEARTS), c4 = FastEval.encode(6, FastEval.SPADES), c5 = FastEval.encode(9, FastEval.CLUBS), c6 = FastEval.encode(8, FastEval.HEARTS), c7 = FastEval.encode(7, FastEval.DIAMONDS); assertEquals( 4309, FastEval.fromBrecher5(FastEval.toBrecher5(FastEval.eval5(c1, c2, c3, c4, c5)))); assertEquals( 3071, FastEval.fromBrecher6(FastEval.toBrecher6(FastEval.eval6(c1, c2, c3, c4, c5, c6)))); assertEquals( 2023, FastEval.fromBrecher7(FastEval.toBrecher7(FastEval.eval7(c1, c2, c3, c4, c5, c6, c7)))); }