Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.18 KB | None | 0 0
  1. #include <iostream>
  2. #include <time.h>
  3. #include <stdlib.h>
  4. #include <conio.h>
  5. #include <cstdlib>
  6. #include <string>
  7. #include "przeciwnik.h"
  8.  
  9. using namespace std;
  10. string gotowaplansza = "";
  11. //przeciwnik zerg1;
  12. //predefinicja jakiegos gowna
  13.  
  14. //jebac papieza polaka pedofila jebanego
  15. void zapelnianie()
  16. {
  17.     if (y == 0)
  18.         for (int i = 0; i < 30; i++)
  19.         {
  20.             plansza[0][i] = '1';
  21.             plansza[29][i] = '1';
  22.         }
  23.     for (y = 1; y < 29; y++)
  24.     {
  25.         for (x = 0; x < 30; x++)
  26.         {
  27.             if (x == 0)
  28.                 plansza[y][x] = '1';
  29.             else if (x == 29)
  30.                 plansza[y][x] = '1';
  31.             else
  32.                 plansza[y][x] = '.';
  33.         }
  34.     }
  35.  
  36. }
  37.  
  38.  
  39. //cimcirimci rysowanko
  40. void rysowanie() {
  41.     gotowaplansza = "";
  42.     for (y = 0; y < 30; y++)
  43.     {
  44.         for (x = 0; x < 30; x++)
  45.         {
  46.             gotowaplansza= gotowaplansza + (plansza[y][x]);
  47.             gotowaplansza.append(" ");
  48.         }
  49.         gotowaplansza.append("\n");
  50.     }
  51.     system("cls");
  52.     cout << gotowaplansza ;
  53. }
  54.  
  55. //funkcja main, nic niezwyklego
  56. int main() {
  57.     srand(time(NULL));
  58.     zapelnianie();
  59.     plansza[postac.Y][postac.X] = 'O';
  60.     system("MODE CON COLS=61 LINES=31");
  61.     zerg karol;
  62.     rysowanie();
  63.     while (1)
  64.     {
  65.         postac.ruch();
  66.         karol.ruchzerg();
  67.         rysowanie();
  68.     }
  69.  
  70.    
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement