コード例 #1
0
        public void TestBoggleAnalyzer2()
        {
            var array = new string[16] {
                "l", "m", "j", "t",
                "v", "h", "u", "o",
                "o", "s", "d", "e",
                "o", "i", "s", "i"
            };

            var analyzer = BoggleAnalyser.CreateForSolution(array);

            Assert.True(analyzer.IsSolution("oov"));
        }
コード例 #2
0
        private async void OnShuffled(RoomStatus status)
        {
            Whiteboard.Clear();
            inputDisabled = false;
            _roomStatus   = status;
            _analyser     = BoggleAnalyser.CreateForSolution(BoggleBoard.CurrentShuffle);

            StateHasChanged();

            await BoggleJsInterop.ClearWordInput(JSRuntime);

            await BoggleJsInterop.FocusWordInput(JSRuntime);
        }
コード例 #3
0
        public void TestBoggleAnalyzer()
        {
            var array = new string[16] {
                "a", "b", "c", "d",
                "e", "f", "g", "h",
                "i", "j", "k", "l",
                "m", "nj", "o", "lj"
            };

            var analyzer = BoggleAnalyser.CreateForSolution(array);

            Assert.False(analyzer.IsSolution("afgg"));
            Assert.True(analyzer.IsSolution("aefjkgcd"));
            Assert.True(analyzer.IsSolution("gcdhkonjmiea"));
            Assert.False(analyzer.IsSolution("gcdhkonmiea"));
            Assert.False(analyzer.IsSolution("gcdhkonmieae"));
            Assert.True(analyzer.IsSolution("ljonj"));
            Assert.True(analyzer.IsSolution("ljol"));
            Assert.True(analyzer.IsSolution("mie"));
        }