My Project
UML Lab
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | Friends | List of all members
Move Class Reference

Class representing a move in the game. More...

#include <move.h>

Public Member Functions

 Move ()
 Default constructor for Move class.
 
 Move (int startX, int startY, int endX, int endY)
 Constructor for Move class.
 
int getStartX () const
 Get the starting X coordinate of the move.
 
int getStartY () const
 Get the starting Y coordinate of the move.
 
int getEndX () const
 Get the ending X coordinate of the move.
 
int getEndY () const
 Get the ending Y coordinate of the move.
 

Private Attributes

int startX
 
int startY
 
int endX
 
int endY
 

Friends

class Board
 

Detailed Description

Class representing a move in the game.

Constructor & Destructor Documentation

◆ Move() [1/2]

Move::Move ( )

Default constructor for Move class.

◆ Move() [2/2]

Move::Move ( int startX,
int startY,
int endX,
int endY )

Constructor for Move class.

Parameters
startXStarting X coordinate.
startYStarting Y coordinate.
endXEnding X coordinate.
endYEnding Y coordinate.

Member Function Documentation

◆ getEndX()

int Move::getEndX ( ) const

Get the ending X coordinate of the move.

Returns
Ending X coordinate.

◆ getEndY()

int Move::getEndY ( ) const

Get the ending Y coordinate of the move.

Returns
Ending Y coordinate.

◆ getStartX()

int Move::getStartX ( ) const

Get the starting X coordinate of the move.

Returns
Starting X coordinate.

◆ getStartY()

int Move::getStartY ( ) const

Get the starting Y coordinate of the move.

Returns
Starting Y coordinate.

Friends And Related Symbol Documentation

◆ Board

friend class Board
friend

Member Data Documentation

◆ endX

int Move::endX
private

Ending X coordinate.

◆ endY

int Move::endY
private

Ending Y coordinate.

◆ startX

int Move::startX
private

Starting X coordinate.

◆ startY

int Move::startY
private

Starting Y coordinate.


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