HOG2
|
#include <SnakeBird.h>
Public Member Functions | |
SnakeBirdState () | |
void | Reset () |
bool | operator== (const SnakeBirdState &s) const |
int | GetNumSnakes () const |
void | SetNumSnakes (int count) |
bool | IsDead (int whichSnake) const |
bool | IsInPlay (int whichSnake) const |
int | GetSnakeHeadLoc (int whichSnake) const |
void | SetSnakeHeadLoc (int whichSnake, int loc) |
int | GetSnakeBodyEnd (int whichSnake) const |
void | SetSnakeBodyEnd (int whichSnake, int endOffset) |
void | SetSnakeLength (int whichSnake, int len) |
int | GetSnakeLength (int whichSnake) const |
snakeDir | GetSnakeDir (int whichSnake, int segment) const |
void | SetSnakeDir (int whichSnake, int segment, snakeDir dir) |
void | InsertSnakeDir (int whichSnake, snakeDir dir) |
void | InsertSnakeHeadDir (int whichSnake, snakeDir dir) |
uint64_t | GetBodyBits (int whichSnake) const |
void | SetBodyBits (int whichSnake, uint64_t bodyBits) |
void | MakeSnakeLonger (int whichSnake) |
void | MakeSnakeLonger (int whichSnake, snakeDir addDir) |
int | GetObjectLocation (int whichObstacle) const |
void | SetObjectLocation (int whichObstacle, int loc) |
bool | GetFruitPresent (int which) const |
void | ToggleFruitPresent (int which) |
bool | KFruitEaten (int k) const |
Public Attributes | |
uint64_t | snakeBodies |
uint64_t | snakeHeads |
uint64_t | locBlockFruit |
Definition at line 44 of file SnakeBird.h.
|
inline |
Definition at line 49 of file SnakeBird.h.
|
inline |
Definition at line 123 of file SnakeBird.h.
References GetSnakeBodyEnd(), and snakeBodies.
Referenced by SnakeBird::SnakeBird::Draw(), MakeSnakeLonger(), and SetSnakeLength().
|
inline |
Definition at line 167 of file SnakeBird.h.
References locBlockFruit.
Referenced by SnakeBird::SnakeBird::DoFirstMovement(), SnakeBird::SnakeBird::Draw(), and SnakeBird::SnakeBird::Render().
|
inline |
Definition at line 54 of file SnakeBird.h.
References SnakeBird::snakeHeadMask, and snakeHeads.
Referenced by SnakeBird::SnakeBird::AddSnake(), SnakeBird::SnakeBird::ApplyAction(), SnakeBird::SnakeBird::ApplyPartialAction(), SnakeBird::SnakeBird::DoFall(), SnakeBird::SnakeBird::DoFirstMovement(), SnakeBird::SnakeBird::Draw(), SnakeBird::SnakeBird::GetActions(), SnakeBird::SnakeBird::GetSuccessors(), MakeSnakeLonger(), SnakeBird::SnakeBird::Render(), and SetSnakeLength().
|
inline |
Definition at line 162 of file SnakeBird.h.
References SnakeBird::locationMask, and locBlockFruit.
Referenced by SnakeBird::SnakeBird::CanPush(), SnakeBird::SnakeBird::DoFall(), SnakeBird::SnakeBird::DoFirstMovement(), SnakeBird::SnakeBird::Draw(), SnakeBird::SnakeBird::HandleTeleports(), and SnakeBird::SnakeBird::Render().
|
inline |
Definition at line 65 of file SnakeBird.h.
References snakeHeads, and SnakeBird::snakeLenMask.
Referenced by SnakeBird::SnakeBird::CanPush(), SnakeBird::SnakeBird::DoFirstMovement(), SnakeBird::SnakeBird::DrawTranslatingSnake(), GetBodyBits(), GetSnakeDir(), GetSnakeLength(), InsertSnakeDir(), InsertSnakeHeadDir(), SnakeBird::SnakeBird::IsOnSpikes(), MakeSnakeLonger(), SnakeBird::SnakeBird::Render(), SetBodyBits(), SetSnakeDir(), and SetSnakeLength().
|
inline |
Definition at line 90 of file SnakeBird.h.
References GetSnakeBodyEnd(), snakeBodies, and SnakeBird::snakeBodyMask.
Referenced by SnakeBird::SnakeBird::CanPush(), SnakeBird::SnakeBird::DrawMovingSnake(), SnakeBird::SnakeBird::DrawSnakeEnteringGoal(), SnakeBird::SnakeBird::DrawTranslatingSnake(), SnakeBird::SnakeBird::GetActions(), SnakeBird::SnakeBird::HandleTeleports(), SnakeBird::SnakeBird::IsOnSpikes(), and SnakeBird::SnakeBird::Render().
|
inline |
Definition at line 60 of file SnakeBird.h.
References snakeHeads.
Referenced by SnakeBird::SnakeBird::ApplyAction(), SnakeBird::SnakeBird::ApplyPartialAction(), SnakeBird::SnakeBird::CanPush(), SnakeBird::SnakeBird::DoFall(), SnakeBird::SnakeBird::DoFirstMovement(), SnakeBird::SnakeBird::Draw(), SnakeBird::SnakeBird::DrawMovingSnake(), SnakeBird::SnakeBird::DrawSnakeEnteringGoal(), SnakeBird::SnakeBird::DrawTranslatingSnake(), SnakeBird::SnakeBird::GetActions(), SnakeBird::SnakeBird::GetSuccessors(), SnakeBird::SnakeBird::HandleTeleports(), IsDead(), IsInPlay(), SnakeBird::SnakeBird::IsOnSpikes(), and SnakeBird::SnakeBird::Render().
|
inline |
Definition at line 87 of file SnakeBird.h.
References GetSnakeBodyEnd().
Referenced by SnakeBird::SnakeBird::ApplyPartialAction(), SnakeBird::SnakeBird::Draw(), SnakeBird::SnakeBird::DrawMovingSnake(), SnakeBird::SnakeBird::DrawSnakeEnteringGoal(), SnakeBird::SnakeBird::HandleTeleports(), MakeSnakeLonger(), and SetSnakeLength().
|
inline |
Definition at line 98 of file SnakeBird.h.
References GetSnakeBodyEnd(), and snakeBodies.
Referenced by SnakeBird::SnakeBird::DoFirstMovement().
|
inline |
Definition at line 111 of file SnakeBird.h.
References GetSnakeBodyEnd(), and snakeBodies.
Referenced by SnakeBird::SnakeBird::DoFirstMovement().
|
inline |
Definition at line 56 of file SnakeBird.h.
References GetSnakeHeadLoc(), and SnakeBird::kDead.
|
inline |
Definition at line 58 of file SnakeBird.h.
References GetSnakeHeadLoc(), SnakeBird::kDead, and SnakeBird::kInGoal.
|
inline |
Definition at line 169 of file SnakeBird.h.
References SnakeBird::kOne, and locBlockFruit.
Referenced by SnakeBird::SnakeBird::ApplyAction(), SnakeBird::SnakeBird::ApplyPartialAction(), SnakeBird::SnakeBird::DoFall(), SnakeBird::SnakeBird::DoFirstMovement(), SnakeBird::SnakeBird::Draw(), and SnakeBird::SnakeBird::HandleTeleports().
|
inline |
Definition at line 141 of file SnakeBird.h.
References GetBodyBits(), GetNumSnakes(), GetSnakeBodyEnd(), SetBodyBits(), and SetSnakeBodyEnd().
|
inline |
Definition at line 151 of file SnakeBird.h.
References GetBodyBits(), GetNumSnakes(), GetSnakeBodyEnd(), GetSnakeLength(), SetBodyBits(), and SetSnakeBodyEnd().
|
inline |
Definition at line 51 of file SnakeBird.h.
References locBlockFruit, snakeBodies, and snakeHeads.
|
inline |
Definition at line 50 of file SnakeBird.h.
References locBlockFruit, snakeBodies, and snakeHeads.
|
inline |
Definition at line 131 of file SnakeBird.h.
References GetSnakeBodyEnd(), and snakeBodies.
Referenced by MakeSnakeLonger(), and SetSnakeLength().
|
inline |
Definition at line 55 of file SnakeBird.h.
References SnakeBird::snakeHeadMask, and snakeHeads.
|
inline |
Definition at line 163 of file SnakeBird.h.
References SnakeBird::locationMask, and locBlockFruit.
Referenced by SnakeBird::SnakeBird::DoFall(), SnakeBird::SnakeBird::DoFirstMovement(), and SnakeBird::SnakeBird::HandleTeleports().
|
inline |
Definition at line 67 of file SnakeBird.h.
References snakeHeads, and SnakeBird::snakeLenMask.
Referenced by SnakeBird::SnakeBird::DoFirstMovement(), MakeSnakeLonger(), and SetSnakeLength().
|
inline |
Definition at line 92 of file SnakeBird.h.
References GetSnakeBodyEnd(), snakeBodies, and SnakeBird::snakeBodyMask.
|
inline |
Definition at line 62 of file SnakeBird.h.
References SnakeBird::locationMask, and snakeHeads.
Referenced by SnakeBird::SnakeBird::ApplyAction(), SnakeBird::SnakeBird::ApplyPartialAction(), SnakeBird::SnakeBird::DoFall(), SnakeBird::SnakeBird::DoFirstMovement(), and SnakeBird::SnakeBird::HandleTeleports().
|
inline |
Definition at line 70 of file SnakeBird.h.
References GetBodyBits(), GetNumSnakes(), GetSnakeBodyEnd(), GetSnakeLength(), SetBodyBits(), and SetSnakeBodyEnd().
|
inline |
Definition at line 168 of file SnakeBird.h.
References SnakeBird::kOne, and locBlockFruit.
Referenced by SnakeBird::SnakeBird::DoFirstMovement().
uint64_t SnakeBird::SnakeBirdState::locBlockFruit |
Definition at line 47 of file SnakeBird.h.
Referenced by GetFruitPresent(), GetObjectLocation(), KFruitEaten(), std::hash< SnakeBird::SnakeBirdState >::operator()(), operator==(), Reset(), SetObjectLocation(), and ToggleFruitPresent().
uint64_t SnakeBird::SnakeBirdState::snakeBodies |
Definition at line 45 of file SnakeBird.h.
Referenced by GetBodyBits(), GetSnakeDir(), InsertSnakeDir(), InsertSnakeHeadDir(), std::hash< SnakeBird::SnakeBirdState >::operator()(), operator==(), Reset(), SetBodyBits(), and SetSnakeDir().
uint64_t SnakeBird::SnakeBirdState::snakeHeads |
Definition at line 46 of file SnakeBird.h.
Referenced by GetNumSnakes(), GetSnakeBodyEnd(), GetSnakeHeadLoc(), std::hash< SnakeBird::SnakeBirdState >::operator()(), operator==(), Reset(), SetNumSnakes(), SetSnakeBodyEnd(), and SetSnakeHeadLoc().