different game ids per game
This commit is contained in:
parent
3917c591b0
commit
d8f9f856e6
4 changed files with 39 additions and 15 deletions
|
|
@ -6,10 +6,11 @@ import { choice } from './util.js'
|
|||
const TILE_SIZE = 64
|
||||
|
||||
async function createPuzzle(targetTiles, image) {
|
||||
const imgFile = './../game' + image
|
||||
const imgUrl = './' + image
|
||||
const imgPath = './../game' + image
|
||||
const imgUrl = image
|
||||
|
||||
// load bitmap, to determine the original size of the image
|
||||
let dim = sizeOf(imgFile)
|
||||
let dim = sizeOf(imgPath)
|
||||
|
||||
// determine puzzle information from the bitmap
|
||||
let info = determinePuzzleInfo(dim.width, dim.height, targetTiles)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue