private int FindBlockBelow(int id) { if (GameTile.GetColumnFromID(id) == 33) { return(GameTile.GetRowFromID(id) + 101); } else { return(id + 100); } }
private bool IsViableRow(int id) { var zuPruefendeZahl = GameTile.GetRowFromID(id);//Null-Indieziert if (zuPruefendeZahl <= -1 || zuPruefendeZahl > 9) { return(false); } else { return(true); } }
private bool CheckForLeftAndRightBounds(int id, TetronimoMovement move) { var row = GameTile.GetRowFromID(id); if (move == TetronimoMovement.Left && row == -0) { return(true); } else if (move == TetronimoMovement.Right && row == 9) { return(true); } else { return(false); } }
private int GetIDRelativFromOldID(int oldId, int zeile, int spalte) { int oldZeile = GameTile.GetColumnFromID(oldId); int oldSpalte = GameTile.GetRowFromID(oldId); int newZeile = oldZeile + zeile; if (newZeile > 33) { newZeile = newZeile - 34; } else if (newZeile < 0) { newZeile = newZeile + 34; } var newSpalte = oldSpalte + spalte; if (newSpalte < 0 || newSpalte > 9) { return(-1); } return(CreateID(newSpalte, newZeile)); }
private GameTile FindGameTileByID(int id) { return(m_GameGrid[GameTile.GetRowFromID(id), GameTile.GetColumnFromID(id)]); }