Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <unistd.h>
- using namespace std;
- int main()
- {
- int const size = 10;
- int arr[size][size];
- int oneCount = 0;
- for(int i = 0; i < size; i++)
- {
- for(int j = 0; j < size; j++)
- {
- arr[i][j] = 0;
- cout << arr[i][j] << " ";
- }
- cout << endl;
- }
- cout << endl;
- //Paint first level board
- //int boadSize = 1;
- //int placeSize = 3;
- int x = 0;
- int y = 0;
- if(arr[x][y] != 1 || arr[x][y] != 2)
- {
- for(int i = y - 1; i < y + 2; i++)
- {
- for(int j = x - 1; j < x + 2; j++)
- {
- if(i >= 0 || j >= 0)
- arr[i][j] = 2;
- }
- }
- arr[x][y] = 1;
- }
- for(int i = 0; i < size; i++)
- {
- for(int j = 0; j < size; j ++)
- cout << arr[i][j] << " ";
- cout << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement