BlueBubble 1.0
A recommendation algorithm for movies based on a Netlfix database
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes
coordinates Class Reference

a class representing coordinates More...

#include <coordinates.h>

Public Member Functions

int get_x ()
 a function to get the x-axis attribute
 
int get_y ()
 a function to get the y-axis attribute
 
 coordinates (int _x, int _y)
 
void move (coordinates move_to)
 change the coordinate values to move the associated piece
 
void print ()
 print the coordinates, utilized for debugging purposes
 

Private Attributes

int x
 
int y
 

Detailed Description

a class representing coordinates

Definition at line 5 of file coordinates.h.

Constructor & Destructor Documentation

◆ coordinates()

coordinates::coordinates ( int _x,
int _y )
inline

Definition at line 12 of file coordinates.h.

12 :
13 x(_x), y(_y)
14 {}

Member Function Documentation

◆ get_x()

int coordinates::get_x ( )

a function to get the x-axis attribute

Returns
the x attribute

Definition at line 6 of file coordinates.cc.

6 {
7 return x;
8}

◆ get_y()

int coordinates::get_y ( )

a function to get the y-axis attribute

Returns
the y attribute

Definition at line 12 of file coordinates.cc.

12 {
13 return y;
14}

◆ move()

void coordinates::move ( coordinates move_to)

change the coordinate values to move the associated piece

Parameters
move_tothe new coordinates

Definition at line 23 of file coordinates.cc.

23 {
24 x = move_to.get_x();
25 y = move_to.get_y();
26}
int get_x()
a function to get the x-axis attribute
Definition coordinates.cc:6
int get_y()
a function to get the y-axis attribute

◆ print()

void coordinates::print ( )

print the coordinates, utilized for debugging purposes

Definition at line 17 of file coordinates.cc.

17 {
18 std::cout << "x:" << x << " y:" << y << std::endl;
19}

Field Documentation

◆ x

int coordinates::x
private

Definition at line 7 of file coordinates.h.

◆ y

int coordinates::y
private

Definition at line 8 of file coordinates.h.


The documentation for this class was generated from the following files: