Untitled

mail@pastecode.io avatar
unknown
c_cpp
2 months ago
1.0 kB
0
Indexable
Never
#include <iostream>
#include <string>
#include <SFML/Graphics.hpp>
using namespace std;
using namespace sf;
int main()
{
	RenderWindow g(VideoMode(1000, 1000), "chocoron makoron lavuviva");

	int n[10] = {};
	int x = 0;

	for (int i = 0; i < 10; i++)
	{
		n[i] = 2 * i;
	}
	while (g.isOpen())
	{
		Event event;
		while (g.pollEvent(event))
		{
			if (event.type == Event::Closed)
				g.close();
		}

		VertexArray sho(LinesStrip, 10);
		sho[0].position = sf::Vector2f(x, n[0]);
		sho[1].position = sf::Vector2f(x + 1, n[1]);
		sho[2].position = sf::Vector2f(x + 2, n[2]);
		sho[3].position = sf::Vector2f(x + 3, n[3]);
		sho[4].position = sf::Vector2f(x + 4, n[4]);
		sho[5].position = sf::Vector2f(x + 5, n[5]);
		sho[6].position = sf::Vector2f(x + 6, n[6]);
		sho[7].position = sf::Vector2f(x + 7, n[7]);
		sho[0].position = sf::Vector2f(x + 8, n[8]);
		sho[1].position = sf::Vector2f(x + 9, n[9]);

		g.clear();
		g.draw(sho);
		g.display();
	}


	
}

Leave a Comment