Beispiel #1
0
        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());
                    }
                }
            }
        }
Beispiel #2
0
        public void SetCurrentLine(SABlock block)
        {
            PoemLine line = block.GetFirstLine();

            if (CurrentLine != line)
            {
                SetOneLine(line);
            }
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        private PoemLine GenerateNextBlock(PoemLine currentLine, bool forward)
        {
            SABlock nextBlock = this.mySAIterator.GetNextBlock(currentLine.ParentPoem.ParentBlock, forward);

            return(nextBlock.GetFirstLine());
        }