Advertisement
Guest User

Komendy

a guest
Apr 14th, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 10.31 KB | None | 0 0
  1. #include "the_commends_choice.h"
  2. #include <iostream>
  3. #include "../entry_to_game/choice_the_hero.h"
  4. #include "../classes_charackter/class_defender.h"
  5. #include "../classes_charackter/class_lycanthrope.h"
  6. #include "../classes_charackter/class_mage.h"
  7. #include "../classes_charackter/class_ninja.h"
  8. #include "../classes_charackter/class_shaman.h"
  9. #include "../classes_charackter/class_warrior.h"
  10. #include "../classes_charackter/class_mefiksos.h"
  11. #include "../entry_to_game/sleep_and_clear.h"
  12. #include "../instructions/instructions.h"
  13. #include <conio.h>
  14. #include "../entry_to_game/choice_the_hero.h"
  15. #include <cstdlib>
  16. #include "../entry_to_game/the_last_game.h"
  17. #include "../fight_with_monster/monsters_vs_heros.h"
  18.  
  19.  
  20.  
  21. void checkTheCommends()
  22. {
  23.  
  24.     unsigned char commendWhatMakeTheHero;
  25.  
  26.  
  27. for(;;){
  28.  
  29.         commendWhatMakeTheHero=getch();
  30.     switch(commendWhatMakeTheHero){
  31.         case 'W':
  32.         case 'w':
  33.  
  34.             system("cls");
  35.  
  36.             if(heroWithWhoYouPlay=='1' || theLastCharackter=='1'){
  37.                 Defender::defender().oneMoveToUpDefender();
  38.                 Defender::defender().positionDefender();
  39.             }else if(heroWithWhoYouPlay=='2' || theLastCharackter=='2'){
  40.                 Lycanthrope::lycanthrope().oneMoveToUpLycanthrope();
  41.                 Lycanthrope::lycanthrope().positionLycanthrope();
  42.             }else if(heroWithWhoYouPlay=='3' || theLastCharackter=='3'){
  43.                 Mage::mage().oneMoveToUpMage();
  44.                 Mage::mage().positionMage();
  45.             }else if(heroWithWhoYouPlay=='4' || theLastCharackter=='4'){
  46.                 Ninja::ninja().oneMoveToUpNinja();
  47.                 Ninja::ninja().positionNinja();
  48.             }else if(heroWithWhoYouPlay=='5' || theLastCharackter=='5'){
  49.                 Shaman::shaman().oneMoveToUpShaman();
  50.                 Shaman::shaman().positionShaman();
  51.             }else if(heroWithWhoYouPlay=='6' || theLastCharackter=='6'){
  52.                 Warrior::warrior().oneMoveToUpWarrior();
  53.                 Warrior::warrior().positionWarrior();
  54.             }else if(heroWithWhoYouPlay==',' || theLastCharackter==','){
  55.                 Mefiksos::mefiksos().oneMoveToUpMefiksos();
  56.                 Mefiksos::mefiksos().positionMefiksos();
  57.             }else{}
  58.  
  59.             break;
  60.         case 'S':
  61.         case 's':
  62.  
  63.             system("cls");
  64.  
  65.             if(heroWithWhoYouPlay=='1' || theLastCharackter=='1'){
  66.                 Defender::defender().oneMoveToDownDefender();
  67.                 Defender::defender().positionDefender();
  68.             }else if(heroWithWhoYouPlay=='2' || theLastCharackter=='2'){
  69.                 Lycanthrope::lycanthrope().oneMoveToDownLycanthrope();
  70.                 Lycanthrope::lycanthrope().positionLycanthrope();
  71.             }else if(heroWithWhoYouPlay=='3' || theLastCharackter=='3'){
  72.                 Mage::mage().oneMoveToDownMage();
  73.                 Mage::mage().positionMage();
  74.             }else if(heroWithWhoYouPlay=='4' || theLastCharackter=='4'){
  75.                 Ninja::ninja().oneMoveToDownNinja();
  76.                 Ninja::ninja().positionNinja();
  77.             }else if(heroWithWhoYouPlay=='5' || theLastCharackter=='5'){
  78.                 Shaman::shaman().oneMoveToDownShaman();
  79.                 Shaman::shaman().positionShaman();
  80.             }else if(heroWithWhoYouPlay=='6' || theLastCharackter=='5'){
  81.                 Warrior::warrior().oneMoveToDownWarrior();
  82.                 Warrior::warrior().positionWarrior();
  83.             }else if(heroWithWhoYouPlay==',' || theLastCharackter==','){
  84.                 Mefiksos::mefiksos().oneMoveToDownMefiksos();
  85.                 Mefiksos::mefiksos().positionMefiksos();
  86.             }else{}
  87.  
  88.             break;
  89.         case 'A':
  90.         case 'a':
  91.  
  92.             system("cls");
  93.  
  94.             if(heroWithWhoYouPlay=='1' || theLastCharackter=='1'){
  95.                 Defender::defender().oneMoveToLeftDefender();
  96.                 Defender::defender().positionDefender();
  97.             }else if(heroWithWhoYouPlay=='2' || theLastCharackter=='2'){
  98.                 Lycanthrope::lycanthrope().oneMoveToLeftLycanthrope();
  99.                 Lycanthrope::lycanthrope().positionLycanthrope();
  100.             }else if(heroWithWhoYouPlay=='3' || theLastCharackter=='3'){
  101.                 Mage::mage().oneMoveToLeftMage();
  102.                 Mage::mage().positionMage();
  103.             }else if(heroWithWhoYouPlay=='4' || theLastCharackter=='4'){
  104.                 Ninja::ninja().oneMoveToLeftNinja();
  105.                 Ninja::ninja().positionNinja();
  106.             }else if(heroWithWhoYouPlay=='5' || theLastCharackter=='5'){
  107.                 Shaman::shaman().oneMoveToLeftShaman();
  108.                 Shaman::shaman().positionShaman();
  109.             }else if(heroWithWhoYouPlay=='6' || theLastCharackter=='6'){
  110.                 Warrior::warrior().oneMoveToLeftWarrior();
  111.                 Warrior::warrior().positionWarrior();
  112.             }else if(heroWithWhoYouPlay==',' || theLastCharackter==','){
  113.                 Mefiksos::mefiksos().oneMoveToLeftMefiksos();
  114.                 Mefiksos::mefiksos().positionMefiksos();
  115.             }else{}
  116.  
  117.             break;
  118.         case 'D':
  119.         case 'd':
  120.  
  121.             system("cls");
  122.  
  123.             if(heroWithWhoYouPlay=='1' || theLastCharackter=='1'){
  124.                 Defender::defender().oneMoveToRightDefender();
  125.                 Defender::defender().positionDefender();
  126.             }else if(heroWithWhoYouPlay=='2' || theLastCharackter=='2'){
  127.                 Lycanthrope::lycanthrope().oneMoveToRightLycanthrope();
  128.                 Lycanthrope::lycanthrope().positionLycanthrope();
  129.             }else if(heroWithWhoYouPlay=='3' || theLastCharackter=='3'){
  130.                 Mage::mage().oneMoveToRightMage();
  131.                 Mage::mage().positionMage();
  132.             }else if(heroWithWhoYouPlay=='4' || theLastCharackter=='4'){
  133.                 Ninja::ninja().oneMoveToRightNinja();
  134.                 Ninja::ninja().positionNinja();
  135.             }else if(heroWithWhoYouPlay=='5' || theLastCharackter=='5'){
  136.                 Shaman::shaman().oneMoveToRightShaman();
  137.                 Shaman::shaman().positionShaman();
  138.             }else if(heroWithWhoYouPlay=='6' || theLastCharackter=='6'){
  139.                 Warrior::warrior().oneMoveToRightWarrior();
  140.                 Warrior::warrior().positionWarrior();
  141.             }else if(heroWithWhoYouPlay==',' || theLastCharackter==','){
  142.                 Mefiksos::mefiksos().oneMoveToRightMefiksos();
  143.                 Mefiksos::mefiksos().positionMefiksos();
  144.             }else{}
  145.  
  146.             break;
  147.             system ("cls");
  148.         case 'E':///ekwipunek
  149.         case 'e':
  150.             std::cout<<"                     ==============================\n";
  151.             std::cout<<"                     |    |     |     |     |     |\n";
  152.             std::cout<<"                     |    |     |     |     |     |\n";
  153.             std::cout<<"                     |    |     |     |     |     |\n";
  154.             std::cout<<"                     |    |     |     |     |     |\n";
  155.             std::cout<<"                     |    |     |     |     |     |\n";
  156.             std::cout<<"                     ==============================\n";
  157.             std::cout<<"                     |    |     |     |     |     |\n";
  158.             std::cout<<"                     |    |     |     |     |     |\n";
  159.             std::cout<<"                     |    |     |     |     |     |\n";
  160.             std::cout<<"                     |    |     |     |     |     |\n";
  161.             std::cout<<"                     |    |     |     |     |     |\n";
  162.             std::cout<<"                     ==============================\n";
  163.             std::cout<<"                     |    |     |     |     |     |\n";
  164.             std::cout<<"                     |    |     |     |     |     |\n";
  165.             std::cout<<"                     |    |     |     |     |     |\n";
  166.             std::cout<<"                     |    |     |     |     |     |\n";
  167.             std::cout<<"                     |    |     |     |     |     |\n";
  168.             std::cout<<"                     ==============================\n";
  169.             std::cout<<"                     |    |     |     |     |     |\n";
  170.             std::cout<<"                     |    |     |     |     |     |\n";
  171.             std::cout<<"                     |    |     |     |     |     |\n";
  172.             std::cout<<"                     |    |     |     |     |     |\n";
  173.             std::cout<<"                     |    |     |     |     |     |\n";
  174.             std::cout<<"                     ==============================\n";
  175.             break;
  176.         case 'H':
  177.         case 'h':
  178.             system("cls");
  179.             instructions();
  180.             break;
  181.         case 'T':///pokazanie statystyk i skili
  182.         case 't':
  183.             system("cls");
  184.  
  185.             if(heroWithWhoYouPlay=='1' || theLastCharackter=='1'){
  186.                 Defender::defender().howSeeTheAttributsDefender();
  187.             }else if(heroWithWhoYouPlay=='2' || theLastCharackter=='2'){
  188.                 Lycanthrope::lycanthrope().howSeeTheAttributsLycanthrope();
  189.             }else if(heroWithWhoYouPlay=='3' || theLastCharackter=='3'){
  190.                 Mage::mage().howSeeTheAttributsMage();
  191.             }else if(heroWithWhoYouPlay=='4' || theLastCharackter=='4'){
  192.                 Ninja::ninja().howSeeTheAttributsNinja();
  193.             }else if(heroWithWhoYouPlay=='5' || theLastCharackter=='5'){
  194.                 Shaman::shaman().howSeeTheAttributsShaman();
  195.             }else if(heroWithWhoYouPlay=='6' || theLastCharackter=='6'){
  196.                 Warrior::warrior().howSeeTheAttributsWarrior();
  197.             }else if(heroWithWhoYouPlay==',' || theLastCharackter==','){
  198.                 Mefiksos::mefiksos().howSeeTheAttributsMefiksos();
  199.             }else{}
  200.  
  201.             break;
  202.         case 'F':///walka z potworami
  203.         case 'f':
  204.             system("cls");
  205.             fighting();
  206.             break;
  207.  
  208.         case '1':
  209.             system("cls");
  210.             ///skill 1
  211.             break;
  212.         case '2':
  213.             system("cls");
  214.             ///skill 2
  215.             break;
  216.         case '3':
  217.             system("cls");
  218.             ///skill 3
  219.             break;
  220.         case '4':
  221.             system("cls");
  222.             /// skill 4
  223.             break;
  224.         case '5':
  225.             system("cls");
  226.             ///skill 5
  227.             break;
  228. }
  229. }
  230. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement