| 87 | }; |
| 88 | |
| 89 | class State { |
| 90 | constructor(grid, move, time, status) { |
| 91 | this.grid = grid; |
| 92 | this.move = move; |
| 93 | this.time = time; |
| 94 | this.status = status; |
| 95 | } |
| 96 | |
| 97 | static ready() { |
| 98 | return new State( |
| 99 | [ |
| 100 | [0, 0, 0, 0], |
| 101 | [0, 0, 0, 0], |
| 102 | [0, 0, 0, 0], |
| 103 | [0, 0, 0, 0], |
| 104 | ], |
| 105 | 0, |
| 106 | 0, |
| 107 | 'ready' |
| 108 | ); |
| 109 | } |
| 110 | |
| 111 | static start() { |
| 112 | return new State(getRandomGrid(), 0, 0, 'playing'); |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | class Game { |
| 117 | constructor(state) { |
nothing calls this directly
no outgoing calls
no test coverage detected