Paweł Łaba commited on
Commit
02a017b
·
1 Parent(s): 2ffd5df

zmiana w uruchamianiu proagramu

Browse files
Files changed (1) hide show
  1. public/script.js +7 -3
public/script.js CHANGED
@@ -122,6 +122,12 @@ async function handleMove(index) {
122
 
123
  // Inicjalizacja gry i pobranie aktualnego stanu
124
  async function initGame() {
 
 
 
 
 
 
125
  try {
126
  const response = await fetch('/status');
127
  const data = await response.json();
@@ -133,8 +139,6 @@ async function initGame() {
133
  initializeBoard();
134
  }
135
 
136
- $('.restart').addEventListener('click', ()=>{
137
- restart();
138
- });
139
 
140
  initGame();
 
122
 
123
  // Inicjalizacja gry i pobranie aktualnego stanu
124
  async function initGame() {
125
+
126
+ $('.restart').addEventListener('click', ()=>{
127
+ log('add event restart');
128
+ restart();
129
+ });
130
+
131
  try {
132
  const response = await fetch('/status');
133
  const data = await response.json();
 
139
  initializeBoard();
140
  }
141
 
142
+
 
 
143
 
144
  initGame();