Exemple #1
0
int CALLBACK WinMain(
        _In_  HINSTANCE,
        _In_  HINSTANCE,
        _In_  LPSTR,
        _In_  int
        )
{
    // TODO: find out what all the third-party code does

    // Q: [non-important bu interesting none the less] What on Earth is handle in C++? (^)

    // TODO: use sprite sheet

    // Q: when should I use pointers?

    AppDelegate app;

    ADDeviceEmulator * emulator = ADDeviceEmulator::getInstance();

    // TODO: why custom? why exactly such arguments?
    // Configure emulator
    DeviceConfig custom(Device::Custom);
    custom.setDeviceName("Custom");
    custom.setScreenDencity(1.0);
    custom.setScreenWidth(1920);
    custom.setScreenHeight(1200);

    emulator->setCustomDevice(custom);

    emulator->setFitTheScreen(true);
    emulator->setDevice(Device::IPad2); // TODO: why IPad2?
    emulator->setLanguage("en");
    emulator->setOrientation(Orientation::Portrait);

    return emulator->run();
}
Exemple #2
0
int CALLBACK WinMain(
        _In_  HINSTANCE,
        _In_  HINSTANCE,
        _In_  LPSTR,
        _In_  int
        )
{
    //Create AppDelegate
    AppDelegate app;

    //Configure emulator
    ADDeviceEmulator* emulator = ADDeviceEmulator::getInstance();


    DeviceConfig custom(Device::Custom);
    custom.setDeviceName("Custom");
    custom.setScreenDencity(1.0);
    custom.setScreenWidth(1920);
    custom.setScreenHeight(1200);
    emulator->setCustomDevice(custom);


    emulator->setFitTheScreen(true);
    emulator->setDevice(Device::IPad2);
    //emulator->setDevice(Device::Galaxy_Tab2_7);
    //emulator->setDevice(Device::Galaxy_Tab2_10);
 //   emulator->setLanguage("en");
 //   emulator->setLanguage("ru");
    emulator->setLanguage("uk");
    emulator->setOrientation(Orientation::Landscape);

    //open all collections
    emulator->addTestCase([](TestInfo info)
    {
        openAllCollectionsScene(info);
    });

    //open one collection

    CollectionID collection_id;
    emulator->addTestCase([&collection_id](TestInfo info)
    {
        const std::vector<Collection>& collections = LevelSaves::getInstance().getCollections();
        collection_id=collections[0].getID();
        openSelectLevelScene(info,collection_id);
    });
    emulator->addTestCase([&collection_id](TestInfo info)
    {
        const std::vector<Collection>& collections = LevelSaves::getInstance().getCollections();
        collection_id=collections[1].getID();
        openSelectLevelScene(info,collection_id);
    });
    emulator->addTestCase([&collection_id](TestInfo info)
    {
        const std::vector<Collection>& collections = LevelSaves::getInstance().getCollections();
        collection_id=collections[2].getID();
        openSelectLevelScene(info,collection_id);
    });

    //open one level
    int difficulty = 0;

    emulator->addTestCase([&collection_id,&difficulty](TestInfo info)
    {
        const std::vector<Collection>& collections = LevelSaves::getInstance().getCollections();
        collection_id=collections[1].getID();
        openLevelScene(info,collection_id,difficulty);
    });
    //difficulty = 1;
    emulator->addTestCase([&collection_id,&difficulty](TestInfo info)
    {
        openLevelScene(info,collection_id,difficulty);
    });
    //difficulty = 2;
    emulator->addTestCase([&collection_id,&difficulty](TestInfo info)
    {
        openLevelScene(info,collection_id,difficulty);
    });



    emulator->addTestCase([&collection_id,&difficulty](TestInfo info)
    {
        const std::vector<Collection>& collections = LevelSaves::getInstance().getCollections();
        collection_id=collections[0].getID();
        openLevelScene(info,collection_id,difficulty);
    });
    //difficulty = 1;
    emulator->addTestCase([&collection_id,&difficulty](TestInfo info)
    {
        openLevelScene(info,collection_id,difficulty);
    });
    //difficulty = 2;
    emulator->addTestCase([&collection_id,&difficulty](TestInfo info)
    {
        openLevelScene(info,collection_id,difficulty);
    });

    return emulator->run();
}
Exemple #3
0
int CALLBACK WinMain(
        _In_  HINSTANCE,
        _In_  HINSTANCE,
        _In_  LPSTR,
        _In_  int
        )
{
    //Create AppDelegate
    AppDelegate app;

    //Configure emulator
    ADDeviceEmulator* emulator = ADDeviceEmulator::getInstance();


    DeviceConfig custom(Device::Custom);
    custom.setDeviceName("Custom");
    custom.setScreenDencity(1.0);
    custom.setScreenWidth(1920);
    custom.setScreenHeight(1200);
    emulator->setCustomDevice(custom);


    emulator->setFitTheScreen(true);
    emulator->setDevice(Device::IPad2);
    emulator->setLanguage("en");
    emulator->setOrientation(Orientation::Portrait);


    char table1[16]={'K','H','H','-',
                     'H','F','-','-',
                     'E','C','A','-',
                     'C','B','-','-'};
    char* t = table1;

    char table2[16]={'A','D','E','F',
                     '-','B','C','D',
                     '-','-','C','B',
                     '-','-','-','-'};
    char* t2 = table2;

    char table3[16]={'D','B','-','L',
                     'B','E','-','-',
                     '-','-','E','B',
                     'L','-','B','D'};
    char* t3 = table3;

    char table4[16]={'J','-','-','J',
                     'E','B','B','E',
                     'C','B','B','C',
                     'J','-','-','J'};
    char* t4 = table4;

    char table5[16]={'D','A','A','F',
                     'A','D','F','A',
                     'A','F','D','A',
                     'F','A','A','D'};
    char* t5 = table5;

    char table6[16]={'D','D','D','D',
                     'C','C','C','C',
                     'J','J','J','J',
                     'J','J','J','J'};
    char* t6 = table6;

    char tableAlphabet1[16] ={'A','B','C','D',
                             'E','F','G','H',
                             'I','J','K','L',
                             'M','N','O','P'};
    char* t_alphabeth1 = tableAlphabet1;

    char tableAlphabet2[16] ={'M','N','O','P',
                             'Q','R','S','T',
                             'U','V','W','X',
                             'Y','Z','-','-'};
    char* t_alphabeth2 = tableAlphabet2;


    //main scene
    emulator->addTestCase([](TestInfo info){
        openMainScene(info);
    });

    emulator->addTestCase(&openMainSceneNoFacebook);
    //setting scene
    emulator->addTestCase([](TestInfo info){
        openSettings(info);
    });
    //show purchase buy window
    emulator->addTestCase([](TestInfo info){
        purchaseBuy(info);
    });


    emulator->addTestCase([t](TestInfo info)
    {
        playGame(info,t);
    });
    emulator->addTestCase([t2](TestInfo info)
    {
        playGame(info,t2);
    });
    emulator->addTestCase([t3](TestInfo info)
    {
        playGame(info,t3);
    });

    emulator->addTestCase([t4](TestInfo info)
    {
        playGame(info,t4);
    });
    emulator->addTestCase([t5](TestInfo info)
    {
        playGame(info,t5);
    });
    emulator->addTestCase([t6](TestInfo info)
    {
        playGame(info,t6);
    });


    //test no for screenf - it is for alphabet colors
    emulator->addTestCase([t_alphabeth1](TestInfo info)
    {
        playGame(info,t_alphabeth1);
    });
    emulator->addTestCase([t_alphabeth2](TestInfo info)
    {
        playGame(info,t_alphabeth2);
    });


    return emulator->run();
}
Exemple #4
0
int CALLBACK WinMain(
    _In_  HINSTANCE,
    _In_  HINSTANCE,
    _In_  LPSTR,
    _In_  int
)
{
    //Create AppDelegate
    AppDelegate app;

    //Configure emulator
    ADDeviceEmulator* emulator = ADDeviceEmulator::getInstance();


    DeviceConfig custom(Device::Custom);
    custom.setDeviceName("Custom");
    custom.setScreenDencity(1.0);
    custom.setScreenWidth(1920);
    custom.setScreenHeight(1200);
    emulator->setCustomDevice(custom);


    emulator->setFitTheScreen(true);
    emulator->setDevice(Device::IPad2);
    emulator->setLanguage("uk");
    emulator->setOrientation(Orientation::Landscape);


    //add screen tests
    emulator->addTestCase(&prepare);

    emulator->addTestCase(&openMainScene);
    emulator->addTestCase([](TestInfo info) {
        openAllCollectionScene(info,true);
    });
    emulator->addTestCase([](TestInfo info) {
        openAllCollectionScene(info,false);
    });
    emulator->addTestCase([](TestInfo info) {
        openOneCollectionScene(info,0);
    });
//    emulator->addTestCase([](TestInfo info){
//        openOneCollectionScene(info,2);
//    });
//    emulator->addTestCase([](TestInfo info){
//        openOneCollectionScene(info,4);
//    });
    emulator->addTestCase([](TestInfo info) {
        openOneLevelScene(info,0,7,0);
    });
//    emulator->addTestCase([](TestInfo info){
//        openOneLevelScene(info,5,0,0);
//    });
    emulator->addTestCase([](TestInfo info) {
        openOneLevelScene(info,4,1,1);
    });
//    emulator->addTestCase([](TestInfo info){
//        openOneLevelScene(info,7,3,0);
//    });

    return emulator->run();
}