Пример #1
0
int kpok::testHand()
{
   int matching=0;
   int w,w2;
   int isRoyal;


   if ((isRoyal=testStraight())) {
      if (testFlush()) {
         if (isRoyal == 2)
            return 10; // royal flush detected
         else
            return 9; // straight flush detected
      }

      else
         return 7;
   }
   if (testFlush()) return 8;


   for (w=0;w < 5; w++) // this searches for pairs/three/four of a kind
      for (w2=w+1; w2<5; w2++) {
         if ( cardHelp[cards[w]] == cardHelp[cards[w2]] ) {
            matching++;
            addFoundCard(w,cards[w]);
            addFoundCard(w2,cards[w2]);             
         }
      }
   return matching;
}
static void testAPI(RTTEST hTest)
{
    testMappingsQuery(hTest);
    testMappingsQueryName(hTest);
    testMapFolder(hTest);
    testUnmapFolder(hTest);
    testCreate(hTest);
    testClose(hTest);
    testRead(hTest);
    testWrite(hTest);
    testLock(hTest);
    testFlush(hTest);
    testDirList(hTest);
    testReadLink(hTest);
    testFSInfo(hTest);
    testRemove(hTest);
    testRename(hTest);
    testSymlink(hTest);
    testMappingsAdd(hTest);
    testMappingsRemove(hTest);
    /* testSetStatusLed(hTest); */
}