operator + method

Block operator +(
  1. Block direction
)

Implementation

Block operator +(Block direction) {
  return Block(x + direction.x, y + direction.y);
}