|
baba-is-auto
C++17 Baba Is You simulator
|
#include <Object.hpp>
Public Member Functions | |
| Object ()=default | |
| Default constructor. | |
| Object (std::vector< ObjectType > types) | |
| bool | operator== (const Object &rhs) const |
| void | Add (ObjectType type) |
| void | Remove (ObjectType type) |
| std::vector< ObjectType > | GetTypes () const |
| bool | HasType (ObjectType type) const |
| bool | HasTextType () const |
| bool | HasNounType () const |
| bool | HasVerbType () const |
| bool | HasPropertyType () const |
Public Attributes | |
| bool | isRule = false |
| Whether this object is part of an active rule. | |
Object class.
This class represents objects such as nouns, operators, and properties. A noun is a word that corresponds to any possible in-game sprite. A few nouns like STAR have multiple corresponding sprites, while VIOLET and FLOWER words have the same corresponding sprites. A noun can be used as a NOUN IS VERB statement e.g. BABA IS YOU to give it a property or as a NOUN IS NOUN statement e.g. WALL IS WATER to turn an object into another object. An operator is a word that goes in between properties and nouns to show the relation between them. A property is something that can be attached to noun words to alter their behavior.
|
default |
Default constructor.
|
explicit |
Constructs an object.
| types | A list of object types. |
| void baba_is_auto::Object::Add | ( | ObjectType | type | ) |
Adds an object type.
| type | An object type to add. |
| std::vector< ObjectType > baba_is_auto::Object::GetTypes | ( | ) | const |
Gets a list of object types, including duplicate stacked objects.
| bool baba_is_auto::Object::HasNounType | ( | ) | const |
Checks the object has noun type.
| bool baba_is_auto::Object::HasPropertyType | ( | ) | const |
Checks the object has property type.
| bool baba_is_auto::Object::HasTextType | ( | ) | const |
Checks the object has text type.
| bool baba_is_auto::Object::HasType | ( | ObjectType | type | ) | const |
Checks the object has specific type.
| type | An object type to check. |
| bool baba_is_auto::Object::HasVerbType | ( | ) | const |
Checks the object has verb type.
| bool baba_is_auto::Object::operator== | ( | const Object & | rhs | ) | const |
Operator overloading for ==.
| rhs | A right side of Object object. |
| void baba_is_auto::Object::Remove | ( | ObjectType | type | ) |
Removes an object type.
| type | An object type to remove. |
| bool baba_is_auto::Object::isRule = false |
Whether this object is part of an active rule.