Browse Source

gamemachine runMatch

Dim Dim 6 years ago
parent
commit
69507a86ea
2 changed files with 234 additions and 227 deletions
  1. 227 227
      package-lock.json
  2. 7 0
      src/Game/game/machine/GameMachine.js

File diff suppressed because it is too large
+ 227 - 227
package-lock.json


+ 7 - 0
src/Game/game/machine/GameMachine.js

@@ -114,6 +114,13 @@ class GameMachine {
     ownerOf(x) {
         return this.state.board.owners[x];
     }
+
+    runMatch(stack) {
+        for (let i = 0; i < 9; i++) {
+            this.runMove(stack[i]);
+        }
+        return this.getWinner();
+    }
 }
 
 class Board {

Some files were not shown because too many files changed in this diff