Skip to content
Snippets Groups Projects
Commit 32e7b796 authored by Grodvalt Enikő Ágnes's avatar Grodvalt Enikő Ágnes
Browse files

korongok kirajzolasa a kezdeti helyukon

parent 3aa0f0c5
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@
#include "widgets.hpp"
#include "app.hpp"
#include "pont.hpp"
#include "korong.hpp"
#include <vector>
#include <string>
......@@ -40,6 +41,14 @@ public:
pontok[i].push_back(new Pont(this, x, y, 10));
}
}
for (int i = 0; i < 9; ++i) {
int xj = 50;
int xe = w-50;
int y = 90 + i*65;
jatekos.push_back(new Korong(this, xj, y, 25, 1));
ellenfel.push_back(new Korong(this, xe, y, 25, 0));
}
}
void action(string id)
......@@ -47,6 +56,8 @@ public:
protected:
vector<vector<Pont*>> pontok;
vector<Korong*> jatekos;
vector<Korong*> ellenfel;
};
int main()
......
......@@ -14,9 +14,9 @@ Pont::~Pont()
void Pont::draw()
{
if(_foglalt)
gout << color(255, 255, 255);
else
gout << color(0, 255, 0);
else
gout << color(255, 255, 255);
for (int i = -_size_x; i <= _size_x; ++i)
for (int j = -_size_x; j <= _size_x; ++j)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment