LCOV - code coverage report
Current view: top level - shared - ControlPawn.cpp (source / functions) Hit Total Coverage
Test: code-coverage.info.cleaned Lines: 20 23 87.0 %
Date: 2023-01-28 00:08:57 Functions: 7 8 87.5 %

          Line data    Source code
       1             : #include <shared.hpp>
       2             : 
       3             : using namespace shared;
       4             : 
       5           2 : ControlPawn::ControlPawn()
       6             : {
       7           2 :     this->reinforced = false;
       8           2 :     this->position = {0, 0};
       9           2 : }
      10             : 
      11          12 : ControlPawn::ControlPawn(std::array<unsigned, 2> position, std::string player)
      12             : {
      13          12 :     this->reinforced = false;
      14          12 :     this->position = position;
      15          12 :     this->player = player;
      16          12 : }
      17             : 
      18          11 : bool ControlPawn::isReinforced()
      19             : {
      20          11 :     return this->reinforced;
      21             : }
      22             : 
      23           5 : void ControlPawn::setReinforced()
      24             : {
      25           5 :     this->reinforced = true;
      26           5 : }
      27             : 
      28           0 : void ControlPawn::setNotReinforced()
      29             : {
      30           0 :     this->reinforced = false;
      31           0 : }
      32             : 
      33           6 : std::array<unsigned, 2> ControlPawn::getPosition()
      34             : {
      35           6 :     return this->position;
      36             : }
      37             : 
      38           1 : ElementEnum ControlPawn::getType()
      39             : {
      40           1 :     return ElementEnum::controlPawn;
      41             : }
      42             : 
      43           4 : std::string ControlPawn::getPlayerName()
      44             : {
      45           4 :     return this->player;
      46             : }

Generated by: LCOV version 1.14