public void GoBlockBegining() { PoemLine curLine = this.CurrentLine; if (systemAccumulation != null) { if (curLine == null) { curLine = systemAccumulation.GetFirstLine(); SetOneLine(curLine); } else { SABlock curBlock = curLine.ParentPoem.ParentBlock; bool isFirstLine = curBlock.IsFirstLine(curLine); if (!isFirstLine) { SetOneLine(curBlock.GetFirstLine()); } } } }
public void SetCurrentLine(SABlock block) { PoemLine line = block.GetFirstLine(); if (CurrentLine != line) { SetOneLine(line); } }
public void GetRandomBlock() { PoemLine result = null; if (systemAccumulation != null) { int blockCount = systemAccumulation.Blocks.Count; int randomIndex = CommonOperations.rnd.Next(blockCount); SABlock block = systemAccumulation.Blocks[randomIndex]; result = block.GetFirstLine(); } SetOneLine(result); }
private PoemLine GenerateNextBlock(PoemLine currentLine, bool forward) { SABlock nextBlock = this.mySAIterator.GetNextBlock(currentLine.ParentPoem.ParentBlock, forward); return(nextBlock.GetFirstLine()); }