Skip to content
Snippets Groups Projects
Commit ff2138f2 authored by Arnaud Albiez's avatar Arnaud Albiez
Browse files

Correction de colission

parent 5d23a901
No related merge requests found
......@@ -29,7 +29,7 @@ struct coordonee position_to(int col, int row, enum Direction direction)
void move_player(struct Grid *grid, enum Direction direction)
{
struct coordonee next_position = position_to(grid->position->col, grid->position->row, direction);
if (get_grid(grid, next_position.col, next_position.row))
if (get_grid(grid, next_position.col, next_position.row) == NONE)
{
grid->position->col = next_position.col;
grid->position->row = next_position.row;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment