public void DecreaseDimensions() { if (board.getTimeMoveForPath()) { rows--; columns--; puzzle = new Puzle(rows, columns); Destroy(board.getMyTank().gameObject); board.Initialize(this, puzzle); } }
public void IncreaseDimensions() { if (board.getTimeMoveForPath())//Si no se ha terminado el recorrido { rows++; columns++; puzzle = new Puzle(rows, columns); Destroy(board.getMyTank().gameObject); board.Initialize(this, puzzle); } }
public void defineDimensions() { uint newRows = Convert.ToUInt32(rowsInput.text); uint newColumns = Convert.ToUInt32(columnsInput.text); if (newRows != null && newColumns != null) { puzzle = new Puzle(newRows, newColumns); Destroy(board.getMyTank().gameObject); board.Initialize(this, puzzle); } }
private void Initialize(uint rows, uint columns) { if (board == null) { throw new InvalidOperationException("The board reference is null"); } this.rows = rows; this.columns = columns; // Se crea el puzle internamente puzzle = new Puzle(rows, columns); // Se crea el resolutor (que puede admitir varias estrategias) // Inicializar todo el tablero de bloques board.Initialize(this, puzzle); }