Compare commits
	
		
			No commits in common. "ece497e2cf47cf960433ad3ccc29ad5b2ce2b6e9" and "61fba348579643ec67536d5f2f75d401587b2bb3" have entirely different histories.
		
	
	
		
			ece497e2cf
			...
			61fba34857
		
	
		
					 1 changed files with 4 additions and 4 deletions
				
			
		|  | @ -139,10 +139,10 @@ class Minesweeper { | |||
|     } | ||||
| 
 | ||||
|     drawField() { | ||||
|         const squareWidth = window.innerWidth / (this.field.length + 4); | ||||
|         const squareHeight = window.innerHeight / (this.field[0].length + 4); | ||||
|         canvas.width = squareWidth * this.field.length; | ||||
|         canvas.height = squareHeight * this.field[0].length; | ||||
|         canvas.width = window.innerWidth; | ||||
|         canvas.height = window.innerHeight; | ||||
|         const squareWidth = canvas.width / (this.field.length + 4); | ||||
|         const squareHeight = canvas.height / (this.field[0].length + 4); | ||||
|         squareHeight > squareWidth ? this.size = squareWidth : this.size = squareHeight; | ||||
| 
 | ||||
|         const offsetX = (canvas.width - (this.field.length * this.size)) / 2; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue