rename function
This commit is contained in:
parent
85e9d14b02
commit
56f35e987b
3 changed files with 5 additions and 5 deletions
|
|
@ -17,11 +17,11 @@ function loadAllGames() {
|
|||
continue
|
||||
}
|
||||
const gameId = m[1]
|
||||
loadGame(gameId)
|
||||
loadGameFromFile(gameId)
|
||||
}
|
||||
}
|
||||
|
||||
function loadGame(gameId) {
|
||||
function loadGameFromFile(gameId) {
|
||||
const file = `${DATA_DIR}/${gameId}.json`
|
||||
const contents = fs.readFileSync(file, 'utf-8')
|
||||
let game
|
||||
|
|
@ -128,7 +128,7 @@ function persistGame(gameId) {
|
|||
export default {
|
||||
createGameObject,
|
||||
loadAllGames,
|
||||
loadGame,
|
||||
loadGameFromFile,
|
||||
persistChangedGames,
|
||||
persistGame,
|
||||
createGame,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue