StanfordCPPLib
Public Member Functions | Public Attributes | List of all members
GridLocation Struct Reference

#include "gridlocation.h"

Public Member Functions

 GridLocation(int row=0, int col=0)
 
GridLocationRange neighbors(int range=1, bool rowMajor=true) const
 
string toString() const
 

Public Attributes

int col
 
int row
 

Constructor & Destructor Documentation

◆ GridLocation()

GridLocation ( int  row = 0,
int  col = 0 
)

Member Function Documentation

◆ neighbors()

GridLocationRange neighbors ( int  range = 1,
bool  rowMajor = true 
) const

◆ toString()

string toString ( ) const

Member Data Documentation

◆ col

int col

◆ row

int row