File tree Expand file tree Collapse file tree 3 files changed +3
-27
lines changed
lib/assets/life-game-rules Expand file tree Collapse file tree 3 files changed +3
-27
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ let patternWidth = 0;
1010let previewCells = [ ] ;
1111
1212//盤面の大きさ
13- let boardSize = 20 ;
13+ const boardSize = 20 ;
1414const cellSize = 450 / boardSize ;
1515
1616//セルの色
@@ -168,14 +168,6 @@ function rerender() {
168168 if ( currentCellColor !== expectedCellColor ) {
169169 button . style . backgroundColor = expectedCellColor ;
170170 }
171-
172- // セルサイズの更新
173- const currentCellsize = button . style . width ;
174- const expectedCellsize = `${ cellSize } px` ;
175- if ( currentCellsize !== expectedCellsize ) {
176- button . style . width = expectedCellsize ;
177- button . style . height = expectedCellsize ;
178- }
179171 }
180172 }
181173}
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ let patternWidth = 0;
1010let previewCells = [ ] ;
1111
1212//変数設定
13- let boardSize = 20 ; //盤面の大きさ(20x20)
13+ const boardSize = 20 ; //盤面の大きさ(20x20)
1414const cellSize = 450 / boardSize ; //セルの大きさ(px)
1515const maxLifespan = 2 ; // セルの最大寿命
1616
@@ -186,14 +186,6 @@ function rerender() {
186186 if ( currentCellColor !== expectedCellColor ) {
187187 button . style . backgroundColor = expectedCellColor ;
188188 }
189-
190- // セルサイズの更新
191- const currentCellsize = button . style . width ;
192- const expectedCellsize = `${ cellSize } px` ;
193- if ( currentCellsize !== expectedCellsize ) {
194- button . style . width = expectedCellsize ;
195- button . style . height = expectedCellsize ;
196- }
197189 }
198190 }
199191}
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ let patternWidth = 0;
1010let previewCells = [ ] ;
1111
1212//変数設定
13- let boardSize = 20 ; //盤面の大きさ(20x20)
13+ const boardSize = 20 ; //盤面の大きさ(20x20)
1414const cellSize = 450 / boardSize ; //セルの大きさ(px)
1515
1616// around: 周囲の生きたセル数 self: 自身が生きているかどうか
@@ -166,14 +166,6 @@ function rerender() {
166166 if ( currentCellColor !== expectedCellColor ) {
167167 button . style . backgroundColor = expectedCellColor ;
168168 }
169-
170- // セルサイズの更新
171- const currentCellsize = button . style . width ;
172- const expectedCellsize = `${ cellSize } px` ;
173- if ( currentCellsize !== expectedCellsize ) {
174- button . style . width = expectedCellsize ;
175- button . style . height = expectedCellsize ;
176- }
177169 }
178170 }
179171}
You can’t perform that action at this time.
0 commit comments