/**
 * Convert game's `x` coordinate to DOM `x` coordinate
 */ export const getGameXToWebX = ( { canvasOffsetLeft , widthMargin , scale , width , } ) => ( gameX ) => { return canvasOffsetLeft + scale * ( gameX + width / 2 + widthMargin ) ; } ; /**
 * Convert game's `y` coordinate to DOM `y` coordinate
 */ export const getGameYToWebY = ( { canvasOffsetTop , heightMargin , scale , height , } ) => ( gameY ) => { return canvasOffsetTop - scale * ( gameY - height / 2 - heightMargin ) ; } ;