Advertisement
Glenpl

Untitled

Aug 26th, 2015
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1.  std::vector<std::shared_ptr<Hex>> Hex_map::get_neighbours(Coord hex) // podstawowa
  2.  {
  3. -    // TODO napisz to
  4. -    std::vector<std::shared_ptr<Hex> neigbours = {};
  5. +    std::vector<std::shared_ptr<Hex>> neigbours = {};
  6. +    for(auto dir : direction_movement)
  7. +    {
  8. +        if(hex_exists(hex + dir))
  9. +        {
  10. +            neigbours.push_back( get_hex_ptr(hex + dir) );
  11. +        }
  12. +    }
  13.      return neigbours;
  14.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement