Skip to content

Commit

Permalink
my brain cells are on vacation
Browse files Browse the repository at this point in the history
  • Loading branch information
MicheleMichetti committed Mar 10, 2024
1 parent 4114403 commit ac76959
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tests/unit-tests/ui_Movement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,31 @@ bool MovingUp(int numberOfSteps) {
utils::Coordinate updated_future_coordinates = my_movement.getFutureCoordinate();
uint8_t updated_future_direction = my_movement.getFutureDirection();

std::cout << "updated_coordinates = " << updated_coordinates.x << "," << updated_coordinates.y << endl;
std::cout << "updated_future_coordinates = " << updated_future_coordinates.x << "," << updated_future_coordinates.y << endl;
std::cout<<"updated_coordinates = "<<updated_coordinates.x<<","<<updated_coordinates.y<<std::endl;
std::cout<<"updated_future_coordinates = "<<updated_future_coordinates.x<<","<<updated_future_coordinates.y<<std::endl;
std::cout<<"updated_direction = "<<updated_direction<<std::endl;
std::cout<<"updated_future_direction = "<<updated_future_direction<<std::endl;

bool result_x = false;
if (updated_coordinates.x == updated_future_coordinates.x) {
result_x == true;
}
std::cout<<result_x<<std::endl;
bool result_y = false;
if ((updated_coordinates.y + 1) == updated_future_coordinates.y) {
result_y == true;
}
std::cout<<result_y<<std::endl;
bool result_direction = false;
if (updated_direction == utils::Direction::none && updated_future_direction == utils::Direction::up) {
if (!(updated_future_direction ^ utils::Direction::up) & 0b11111111) {
result_direction == true;
}
std::cout<<result_direction<<std::endl;

resetState();

return result_x & result_y & result_direction;

resetState();
}

namespace {
Expand Down

0 comments on commit ac76959

Please sign in to comment.