コード例 #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);
        }
コード例 #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);
        }
コード例 #3
0
        public void SwitchBoard(string boardName)
        {
            var index = BoardNameList.IndexOf(boardName);

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

            return;
        }