void updateBlick() { Blick thisBlick = getBlick(); if (!thisBlick.isOccupied()) { thisBlick.setOccupied(true); thisBlick.block = this; } }
public bool checkDown() { bool ret = false; if (blickPos.y > 0) { Blick other = GameController.accessGameController().blickGrid [(int)blickPos.x, (int)(blickPos.y - 1)]; if (!other.isOccupied()) { ret = true; } } return(ret); }
public bool checkRight() { bool ret = false; if (blickPos.x < (GameController.cols - 1)) { Blick other = GameController.accessGameController().blickGrid [(int)(blickPos.x + 1), (int)blickPos.y]; if (!other.isOccupied()) { ret = true; } } return(ret); }
//CHECK NEARBY BLICK METHODS //ALL METHODS RETURN TRUE IF BLICK IS EMPTY, FALSE IF NOT public static bool checkCustom(Vector2 dest) { bool ret = false; if (Blick.isInBlickArray(dest)) { Blick other = GameController.accessGameController().blickGrid [(int)dest.x, (int)dest.y]; if (!other.isOccupied()) { ret = true; } } return(ret); }