PHP Class PHPWarrior\Floor

Show file Open project: yandod/php-warrior

Public Properties

Property Type Description
$height
$stairs_location
$units
$width

Public Methods

Method Description
add ( $unit, $x, $y, null $direction = null ) Add.
character ( ) : string Charecter
get ( $x, $y ) : mixed Get.
is_out_of_bounds ( $x, $y ) : boolean Is it out of bounds?
other_units ( ) : array Other units.
place_stairs ( $x, $y ) Place the stairs.
space ( $x, $y ) : Space Space.
stairs_space ( ) : mixed Stairs space.
unique_units ( ) : array Get the unique units.
units ( ) : array Units.

Method Details

add() public method

Add.
public add ( $unit, $x, $y, null $direction = null )
$unit
$x
$y
$direction null

character() public method

Charecter
public character ( ) : string
return string

get() public method

Get.
public get ( $x, $y ) : mixed
$x
$y
return mixed

is_out_of_bounds() public method

Is it out of bounds?
public is_out_of_bounds ( $x, $y ) : boolean
$x
$y
return boolean

other_units() public method

Other units.
public other_units ( ) : array
return array

place_stairs() public method

Place the stairs.
public place_stairs ( $x, $y )
$x
$y

space() public method

Space.
public space ( $x, $y ) : Space
$x
$y
return Space

stairs_space() public method

Stairs space.
public stairs_space ( ) : mixed
return mixed

unique_units() public method

Get the unique units.
public unique_units ( ) : array
return array

units() public method

Units.
public units ( ) : array
return array

Property Details

$height public property

public $height

$stairs_location public property

public $stairs_location

$units public property

public $units

$width public property

public $width