Example #1
0
        private bool TryGetPreviousBoardNotEmpty(bool isEnd = false)
        {
            RefreshBoardNameList();
            int index = BoardNameList.Count;

            do
            {
                if (!isEnd)
                {
                    if (BoardNameList.Contains(BoardName))
                    {
                        index = BoardNameList.IndexOf(BoardName);
                    }
                    else
                    {
                        return(false);
                    }
                }
                if (index <= 0)
                {
                    return(false);
                }
                isEnd = false;
            } while ((!TrySelectBoard(--index)) || (!TryGetPreviousSideNotEmpty(true)));

            return(true);
        }
Example #2
0
        private bool TryGetNextBoardNotEmpty(bool isHead = false)
        {
            int index = -1;

            RefreshBoardNameList();
            do
            {
                if (!isHead)
                {
                    if (BoardNameList.Contains(BoardName))
                    {
                        index = BoardNameList.IndexOf(BoardName);
                    }
                    else
                    {
                        return(false);
                    }
                }
                if (index >= BoardNameList.Count - 1)
                {
                    return(false);
                }
                isHead = false;
            } while ((!TrySelectBoard(++index)) || (!TryGetNextSideNotEmpty(true)));

            return(true);
        }
Example #3
0
        public void SwitchBoard(string boardName)
        {
            var index = BoardNameList.IndexOf(boardName);

            if (TrySelectBoard(index) && TrySelectSide(0) && TrySelectShot(0) && TrySelectDefect(0))
            {
            }

            return;
        }