 |
Minesweeper2
V1.1.1
Game in C++ by Górka Mateusz
|
Go to the documentation of this file.
47 { this->
val(
static_cast<uint8_t
>(
code ) ); }
72 inline uint8_t
val()
const
73 {
return (uint8_t)
code & 0x0F; }
80 inline void val(
const uint8_t value )
110 {
return (
code & 0xF0 ) == 0x10; }
119 {
return (
code & 0xF0 ) == 0x20; }
127 {
return (
code & 0xF0 ) == 0x00; }
142 {
return (
code & 0xF0 ) != 0x20; }
150 {
return (
code & 0x0F ) == 0x09; }
158 {
return (
code & 0x0F ) == 0x00; }
void flag()
Set flag on the field.
Definition: Field.hpp:87
bool hidden() const
todo Zamiania uncover, covered, hidden
Definition: Field.hpp:141
bool covered() const
Is field covered? (is covered)
Definition: Field.hpp:126
FieldCode
Codes of Fields.
Definition: FieldCode.hpp:8
Field()
Construct a new Field object.
Definition: Field.hpp:34
Field(const Field &field)
Copy constructor.
Definition: Field.hpp:53
bool empty() const
Is the field empty?
Definition: Field.hpp:157
bool flagged() const
Is field flagged? ** flagged field is covered! **.
Definition: Field.hpp:109
Field(FieldCode code)
Construct a new Field object.
Definition: Field.hpp:46
Field(uint8_t v)
Construct a new Field object.
Definition: Field.hpp:40
std::ostream & operator<<(std::ostream &strm, const Field &field)
Operator to display a field information.
Definition: Field.cpp:4
bool uncovered() const
Is field uncovered? (no covered, no flag)
Definition: Field.hpp:118
void unflag()
Delete flag from the field.
Definition: Field.hpp:93
uint8_t val() const
Return value of field.
Definition: Field.hpp:72
~Field()=default
Destroy the Field object (default destructor)
uint8_t code
Value of fields code.
Definition: Field.hpp:28
uint8_t & operator*()
Operator of one side *.
Definition: Field.hpp:65
Field of the board.
Definition: Field.hpp:26
void val(const uint8_t value)
Set value of field and cover.
Definition: Field.hpp:80
void uncover()
Uncover the field.
Definition: Field.hpp:99
bool mine() const
Is the mine?!
Definition: Field.hpp:149