-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAether.cpp
More file actions
46 lines (35 loc) · 723 Bytes
/
Copy pathAether.cpp
File metadata and controls
46 lines (35 loc) · 723 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include "Aether.h"
#include "olcPixelGameEngine/olcPixelGameEngine.h"
Aether::Aether(size_t width, size_t height)
: _snake(width, height)
{
}
Aether::~Aether()
{
}
bool Aether::OnUserCreate()
{
olc::PixelGameEngine::SetPixelMode(olc::Pixel::ALPHA);
std::cout << __FUNCTION__ << std::endl;
return true;
}
bool Aether::OnUserUpdate(float fElapsedTime)
{
// while(this->_snake.iterate());
// return false;
this->Clear(olc::BLACK);
static int iterations = 0;
if (true) // DO ITERATE? this is a debug thingy
{
if (!this->_snake.iterate())
{
std::cout << iterations << std::endl;
return false;
system("pause");
}
++iterations;
}
this->_snake.draw(this);
// system("pause");
return true;
}