- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
Latest commit
29 lines (24 loc) · 605 Bytes
/
Copy pathmain.cpp
File metadata and controls
29 lines (24 loc) · 605 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include<SFML/Graphics.hpp>
#include"boards.cpp"
#include<stdio.h>
intmain()
{
sf::RenderWindow window(sf::VideoMode(500, 500), "Pong!");
board_t board1, board2;
while (window.isOpen())
{
board1.setPosition(0, board1.yPos);
board2.setPosition(495, board2.yPos);
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(board1);
window.draw(board2);
window.display();
}
return0;
}