MCPcopy Create free account
hub / github.com/AlexInLog/ReactivePlusPlus / wrap_coordinate

Function wrap_coordinate

src/examples/rpp/sfml/snake/snake.cpp:23–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23static int wrap_coordinate(int value, int max_value)
24{
25 return value < 0 ? max_value : value > max_value ? 0
26 : value;
27}
28
29static SnakeBody move_snake(SnakeBody&& body, const std::tuple<Direction, size_t>& direction_and_length)
30{

Callers 1

move_snakeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected