Made Snake Game in C++ .

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 6

  • @hishamsomroz6913
    @hishamsomroz6913 3 года назад +6

    where's the code?

    • @dudefrombelgium
      @dudefrombelgium 3 года назад

      #include
      using namespace std;
      bool gameOver;
      const int width = 25;
      const int height = 25;
      int x , y, fruitX, fruitY, score;
      int tailX[100], tailY[100];
      int nTail;
      enum eDirection {STOP = 0, LEFT,RIGHT,UP,DOWN};
      eDirection dir;
      void Setup ()
      {
      gameOver = false;
      dir = STOP;
      x = width / 2;
      y = height / 2;
      fruitX = rand() % width;
      fruitY = rand() % height;
      score = 0;
      }
      void Draw ()
      {
      system("cls");
      for(int i = 0; i < width+2; i++)
      cout

    • @hishamsomroz6913
      @hishamsomroz6913 3 года назад

      @@dudefrombelgium alright, ty.

    • @dudefrombelgium
      @dudefrombelgium 3 года назад

      @@hishamsomroz6913 its a long time ago but perhaps it may be usefull :)

  • @mistermmk9169
    @mistermmk9169 4 года назад +6

    bro sometimes sharing source code is good... plz..

  • @harshitshukla1372
    @harshitshukla1372 2 года назад

    Code dedo