+ const k = document.getElementById("myRange").value;
+ const movesWidth = 280; //TODO: constant somewhere...;
+ const minBoardWidth = 240; //TODO: same
+ // Value of 0 is board min size; 100 is screen.width - movesWidth
+ const boardSize = k * (screen.width - (movesWidth+minBoardWidth)) / 100 + minBoardWidth;