• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdegames API Reference
  • KDE Home
  • Contact Us
 

kapman

Public Types | Public Member Functions | Static Public Attributes | List of all members
Cell Class Reference

#include <cell.h>

Public Types

enum  Type { WALL = 0, CORRIDOR = 1, GHOSTCAMP = 2 }
 

Public Member Functions

 Cell ()
 
 ~Cell ()
 
int getCost () const
 
Element * getElement () const
 
Cell * getParent () const
 
Type getType () const
 
void setCost (const int p_cost)
 
void setElement (Element *p_element)
 
void setParent (Cell *p_parent)
 
void setType (Type p_type)
 

Static Public Attributes

static const qreal SIZE = 20.0
 

Detailed Description

This class represents a Cell of the Maze.

Definition at line 28 of file cell.h.

Member Enumeration Documentation

enum Cell::Type

The Cell possible types.

Enumerator
WALL 
CORRIDOR 
GHOSTCAMP 

Definition at line 36 of file cell.h.

Constructor & Destructor Documentation

Cell::Cell ( )

Creates a new Cell instance.

Definition at line 23 of file cell.cpp.

Cell::~Cell ( )

Deletes the Cell instance.

Definition at line 26 of file cell.cpp.

Member Function Documentation

int Cell::getCost ( ) const

Gets the Cell cost for A* pathfinding algorithm.

Returns
the Cell cost for A* pathfinding algorithm

Definition at line 47 of file cell.cpp.

Element * Cell::getElement ( ) const

Gets the Element that is on the Cell.

Returns
the Element that is on the Cell

Definition at line 39 of file cell.cpp.

Cell * Cell::getParent ( ) const

Gets the parent Cell of this Cell for A* pathfinding algorithm.

Returns
the Cell parent for A* pathfinding algorithm

Definition at line 55 of file cell.cpp.

Cell::Type Cell::getType ( ) const

Gets the Cell type.

Returns
the Cell type

Definition at line 31 of file cell.cpp.

void Cell::setCost ( const int  p_cost)

Sets a cost for the Cell, for A* pathfinding algorithm.

Parameters
p_costthe cost of the Cell for A* pathfinding algorithm

Definition at line 51 of file cell.cpp.

void Cell::setElement ( Element *  p_element)

Sets the Element that is on the Cell.

Parameters
p_elementthe Element to set on the Cell

Definition at line 43 of file cell.cpp.

void Cell::setParent ( Cell *  p_parent)

Sets the parent Cell of this Cell for A* pathfinding algorithm.

Parameters
p_parentthe parent of the Cell for A* pathfinding algorithm

Definition at line 59 of file cell.cpp.

void Cell::setType ( Cell::Type  p_type)

Sets the Cell type.

Parameters
p_typethe new type to set

Definition at line 35 of file cell.cpp.

Member Data Documentation

const qreal Cell::SIZE = 20.0
static

The Cell side size.

Definition at line 33 of file cell.h.


The documentation for this class was generated from the following files:
  • cell.h
  • cell.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:15 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kapman

Skip menu "kapman"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdegames API Reference

Skip menu "kdegames API Reference"
  • granatier
  • kapman
  • kblackbox
  • kgoldrunner
  • kigo
  • kmahjongg
  • KShisen
  • ksquares
  • libkdegames
  •   highscore
  •   libkdegamesprivate
  •     kgame
  • libkmahjongg
  • palapeli
  •   libpala

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal