diff --git a/package.json b/package.json index d7c363a7..663f988e 100644 --- a/package.json +++ b/package.json @@ -48,5 +48,5 @@ "preview:https": "serve dist", "reinstall": "rm -rf node_modules; yarn; vue-tsc --noEmit" }, - "version": "5.0.0-alpha.284" + "version": "5.0.0-alpha.285" } diff --git a/src/components/units/AppGameVariants.vue b/src/components/units/AppGameVariants.vue index 83e54437..695541c0 100644 --- a/src/components/units/AppGameVariants.vue +++ b/src/components/units/AppGameVariants.vue @@ -123,7 +123,7 @@ { - "cn": { + "zh": { "gameVariantsTitle": "请选择游戏变体" }, "en-US": { diff --git a/src/components/units/AppUpdates.vue b/src/components/units/AppUpdates.vue index c62fbed9..c1457e27 100644 --- a/src/components/units/AppUpdates.vue +++ b/src/components/units/AppUpdates.vue @@ -115,7 +115,7 @@ { - "cn": { + "zh": { "title": "又更新了!?", "message0": "如果页脚显示的版本号落后于此处", "message1": "的最新版本, 请尝试使用", diff --git a/src/components/units/AppWelcome.vue b/src/components/units/AppWelcome.vue index 075b29f8..fe4b1410 100644 --- a/src/components/units/AppWelcome.vue +++ b/src/components/units/AppWelcome.vue @@ -106,10 +106,10 @@ button { { - "cn": { + "zh": { "title": "欢迎!" }, - "en": { + "en-US": { "title": "Welcome! " }, "es": { diff --git a/src/components/units/DemoMode/AppDemo.vue b/src/components/units/DemoMode/AppDemo.vue index 1c8da0d6..862102dd 100644 --- a/src/components/units/DemoMode/AppDemo.vue +++ b/src/components/units/DemoMode/AppDemo.vue @@ -1,7 +1,11 @@ @@ -14,38 +18,70 @@ const store = useStore(); const games = [ + { gameId: "tictactoe", variantId: "regular", isDrawGame: false }, + { gameId: "chinesechess", variantId: "regular", isDrawGame: false, startPosition: "1_---k---------------------P---------------------------R-------------n------------------K---" }, + { gameId: "topitop", variantId: "regular", isDrawGame: false }, + { gameId: "quarto", variantId: "regular", isDrawGame: false }, + { gameId: "kayles", variantId: "12", isDrawGame: false }, + { gameId: "lewthwaitesgame", variantId: "standard", isDrawGame: false }, + { gameId: "nim", variantId: "7_8_11_13_15", isDrawGame: false }, + { gameId: "rubiksmagic", variantId: "regular", isDrawGame: false }, + { gameId: "joust", variantId: "5x4", isDrawGame: false }, + { gameId: "domineering", variantId: "6", isDrawGame: false }, + { gameId: "chopsticks", variantId: "0", isDrawGame: true }, + { gameId: "change", variantId: "regular", isDrawGame: false }, + { gameId: "nutictactoe", variantId: "regular", isDrawGame: true }, + { gameId: "oddoreven", variantId: "regular", isDrawGame: false }, + { gameId: "ponghauki", variantId: "regular", isDrawGame: true }, + { gameId: "squaredance", variantId: "regular", isDrawGame: false }, + { gameId: "fourfieldkono", variantId: "standard", isDrawGame: true }, + { gameId: "foxandhounds", variantId: "regular", isDrawGame: false }, + { gameId: "graphgame", variantId: "2", isDrawGame: false }, + { gameId: "0to10by1or2", variantId: "regular", isDrawGame: false }, + { gameId: "allqueenschess", variantId: "standard", isDrawGame: false }, + { gameId: "lightsout", variantId: "8", isDrawGame: false }, + { gameId: "nqueens", variantId: "8", isDrawGame: false }, + { gameId: "pegsolitaire", variantId: "triangle", isDrawGame: false }, + { gameId: "rushhour", variantId: "expert", isDrawGame: false }, + { gameId: "npuzzle", variantId: "3", isDrawGame: false }, + { gameId: "toadsandfrogspuzzle", variantId: "4", isDrawGame: false }, + { gameId: "towersofhanoi", variantId: "3_6", isDrawGame: false }, + { gameId: "rubikscube", variantId: "2x2x2", isDrawGame: false }, + { gameId: "bishoppuzzle", variantId: "4x5_8", isDrawGame: false }, + { gameId: "quickcross", variantId: "regular", isDrawGame: true }, + { gameId: "dao", variantId: "regular", isDrawGame: true }, + { gameId: "sim", variantId: "regular", isDrawGame: false }, + { gameId: "snake", variantId: "regular", isDrawGame: false }, + { gameId: "tactix", variantId: "regular", isDrawGame: false }, + { gameId: "mutorere", variantId: "regular", isDrawGame: true }, + { gameId: "dragonsandswans", variantId: "3", isDrawGame: false }, + { gameId: "shifttactoe", variantId: "default", isDrawGame: false }, + { gameId: "y", variantId: "dim5", isDrawGame: false }, + { gameId: "lgame", variantId: "regular", isDrawGame: true }, + { gameId: "tictactwo", variantId: "regular", isDrawGame: false }, + { gameId: "chungtoi", variantId: "regular", isDrawGame: true }, + { gameId: "dawsonschess", variantId: "15", isDrawGame: true }, + { gameId: "tootandotto", variantId: "6", isDrawGame: false }, { gameId: "1dchess", variantId: "regular", isDrawGame: false }, { gameId: "fivefieldkono", variantId: "delta", isDrawGame: true }, - { gameId: "chinesechess", variantId: "regular", isDrawGame: false, startPosition: "1_---k---------------------P---------------------------R-------------n------------------K---" }, { gameId: "3spot", variantId: "regular", isDrawGame: false }, { gameId: "achi", variantId: "regular", isDrawGame: false }, { gameId: "beeline", variantId: "regular", isDrawGame: true }, { gameId: "chomp", variantId: "4x7", isDrawGame: false }, - { gameId: "369mm", variantId: "regular", isDrawGame: true }, - { gameId: "connect4c", variantId: "6x7", isDrawGame: false }, + { gameId: "ninemensmorris", variantId: "regular", isDrawGame: true }, + { gameId: "connect4", variantId: "6x7", isDrawGame: false }, { gameId: "dinododgem", variantId: "regular", isDrawGame: true }, { gameId: "dodgem", variantId: "regular", isDrawGame: false }, - { gameId: "gameofy", variantId: "dim5", isDrawGame: false }, - { gameId: "haregame", variantId: "m-hounds-first", isDrawGame: false }, + { gameId: "hareandhounds", variantId: "m-hounds-first", isDrawGame: false }, { gameId: "baghchal", variantId: "regular", isDrawGame: true }, { gameId: "lite3", variantId: "three-in-a-row", isDrawGame: false }, - { gameId: "Lgame", variantId: "regular", isDrawGame: true }, { gameId: "notakto", variantId: "board3", isDrawGame: false }, - { gameId: "othello", variantId: "regular", isDrawGame: false }, - { gameId: "quarto", variantId: "regular", isDrawGame: false }, - { gameId: "quickcross", variantId: "regular", isDrawGame: true }, - { gameId: "quickchess", variantId: "regular", isDrawGame: false }, - { gameId: "stt", variantId: "default", isDrawGame: false }, - { gameId: "dao", variantId: "regular", isDrawGame: true }, - { gameId: "tactix", variantId: "regular", isDrawGame: false }, - { gameId: "ttt", variantId: "regular", isDrawGame: false }, - { gameId: "mutorere", variantId: "regular", isDrawGame: true }, - { gameId: "tttwo", variantId: "regular", isDrawGame: false }, - { gameId: "topitop", variantId: "regular", isDrawGame: false }, + { gameId: "othello", variantId: "regular", isDrawGame: false } ]; const currentGameIndex = ref(0); const initiateCurrentGame = async () => { + store.dispatch(actionTypes.exitMatch); await store.dispatch(actionTypes.initiateMatch, { gameId: games[currentGameIndex.value].gameId, variantId: games[currentGameIndex.value].variantId, @@ -63,7 +99,7 @@ const currRep = ref(0); const gameOverTimeoutMilisec = 5000; const isEndOfDrawMatch = computed(() => games[currentGameIndex.value].isDrawGame && store.getters.currentRoundId > 21); - const isEndOfMatch = computed(() => store.getters.isEndOfMatch || isEndOfDrawMatch.value); + const isEndOfMatch = computed(() => store.getters.isEndOfMatch || isEndOfDrawMatch.value || store.getters.currentRoundId > 99); watch( () => isEndOfMatch.value, async () => { @@ -74,7 +110,7 @@ store.commit(mutationTypes.setLeftPlayerIsComputer, false); store.commit(mutationTypes.setRightPlayerIsComputer, false); await new Promise((resolve) => setTimeout(resolve, gameOverTimeoutMilisec)); - if (++currRep.value == repeat) { + if (++currRep.value >= repeat) { /* If reached max repeat times, load the next game in list. */ currRep.value = 0; currentGameIndex.value = (currentGameIndex.value + 1) % games.length; @@ -102,5 +138,11 @@ > * { margin: 1rem; } + > .dvvh { + width: 60%; + } + > .dbody { + width: 35%; + } } diff --git a/src/components/units/DemoMode/AppDemoBody.vue b/src/components/units/DemoMode/AppDemoBody.vue index e0dd0f53..281ed418 100644 --- a/src/components/units/DemoMode/AppDemoBody.vue +++ b/src/components/units/DemoMode/AppDemoBody.vue @@ -3,6 +3,7 @@
+

Computer Move Duration (milliseconds)