Conquer Chess
Chess and Starcraft combined
Loading...
Searching...
No Matches
Public Member Functions | List of all members
square_layout Class Reference

The layout of a square. More...

#include <square_layout.h>

Public Member Functions

 square_layout (const screen_rect &square_rect=screen_rect(screen_coordinate(0, 0), screen_coordinate(20, 20)))
 
const screen_rectget_square () const noexcept
 The full square.
 
const screen_rectget_health_bar_outline () const noexcept
 The outline of the health bar.
 
screen_rect get_health_bar_value (const double f, const race r=race::classic) const
 The health bar value, a bar within the outline of the health bar.
 
screen_rect get_shield_bar_value (const double f) const
 The shield bar value, a bar within the lower half of the outline of the health bar.
 
const screen_rectget_piece () const noexcept
 
const screen_rectget_is_protected () const noexcept
 

Detailed Description

The layout of a square.

This layout is only relevant if there is a piece in this square

+------------------+
|+----------------+|
|| health_bar ||
|| ||
|| ||
|+----------------+|
|| piece ||
|| ||
|| ||
|| ||
|| ||
|| ||
|| ||
|| ||
|| +-+||
|| |1|||
|| +-+||
|+----------------+|
+------------------+
- 1: symbol to show if the piece is protected

Or for a rooxx piece:

+------------------+
|+----------------+|
|| health_bar ||
|+----------------+|
|| shield_bar ||
|+----------------+|
|| piece ||
|| ||
|| ||
|| ||
|| ||
|| ||
|| ||
|| ||
|| +-+||
|| |1|||
|| +-+||
|+----------------+|
+------------------+
- 1: symbol to show if the piece is protected

Constructor & Destructor Documentation

◆ square_layout()

square_layout::square_layout ( const screen_rect square_rect = screen_rect(screen_coordinate(0, 0), screen_coordinate(20, 20)))

Member Function Documentation

◆ get_health_bar_outline()

const screen_rect & square_layout::get_health_bar_outline ( ) const
inlinenoexcept

The outline of the health bar.

◆ get_health_bar_value()

screen_rect square_layout::get_health_bar_value ( const double  f,
const race  r = race::classic 
) const

The health bar value, a bar within the outline of the health bar.

◆ get_is_protected()

const screen_rect & square_layout::get_is_protected ( ) const
inlinenoexcept

◆ get_piece()

const screen_rect & square_layout::get_piece ( ) const
inlinenoexcept

◆ get_shield_bar_value()

screen_rect square_layout::get_shield_bar_value ( const double  f) const

The shield bar value, a bar within the lower half of the outline of the health bar.

◆ get_square()

const screen_rect & square_layout::get_square ( ) const
inlinenoexcept

The full square.


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