put on the backburner
This commit is contained in:
@@ -40,6 +40,13 @@ void PointCollection::move() {
|
|||||||
void PointCollection::check_collision() {
|
void PointCollection::check_collision() {
|
||||||
for(int i = m_point_list.size() - 1; i >= 0; i--) {
|
for(int i = m_point_list.size() - 1; i >= 0; i--) {
|
||||||
if(m_point_list[i].m_direction == 'u') {
|
if(m_point_list[i].m_direction == 'u') {
|
||||||
|
// if(m_point_list[i + 1].m_row == m_point_list[i].m_row || m_point_list[i - 1].m_row == m_point_list[i].m_row) {
|
||||||
|
// if(m_point_list[i + 1].m_col == m_point_list[i].m_col || m_point_list[i - 1].m_col < m_point_list[i].m_col) {
|
||||||
|
// if(m_point_list[i].m_row > m_point_list[i + 1].m_row || m_point_list[i].m_row > m_point_list[i - 1].m_row) {
|
||||||
|
// m_point_list[i].m_row += 1;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
if(m_point_list[i].m_direction == 'd') {
|
if(m_point_list[i].m_direction == 'd') {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ int main() {
|
|||||||
collection.m_point_list.back().assign();
|
collection.m_point_list.back().assign();
|
||||||
|
|
||||||
while (running) {
|
while (running) {
|
||||||
|
collection.check_collision();
|
||||||
collection.move();
|
collection.move();
|
||||||
window.draw_window(collection);
|
window.draw_window(collection);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user