Easy_rider
 
Loading...
Searching...
No Matches
Intersection.h
Go to the documentation of this file.
1
7#ifndef INTERSECTION_H
8#define INTERSECTION_H
9
10#include <utility>
11
17public:
22
28 Intersection(int x, int y);
29
35 void setPosition(int x, int y);
36
41 std::pair<int, int> getPosition() const;
42
47 int getX() const;
48
53 int getY() const;
54
55private:
56 int x_;
57 int y_;
58};
59
60#endif // INTERSECTION_H
Represents a point (intersection) in a 2D coordinate system.
Definition Intersection.h:16
int getY() const
Retrieves the y-coordinate.
Definition Intersection.cpp:21
void setPosition(int x, int y)
Sets a new position for the intersection.
Definition Intersection.cpp:12
Intersection()
Default constructor.
Definition Intersection.cpp:8
int getX() const
Retrieves the x-coordinate.
Definition Intersection.cpp:19
std::pair< int, int > getPosition() const
Retrieves the current position of the intersection.
Definition Intersection.cpp:17