From ffcdff7ab33abc0b3d32bb750056ae6193be397e Mon Sep 17 00:00:00 2001 From: giongto35 Date: Sat, 4 May 2019 17:52:46 +0800 Subject: [PATCH] Update comments --- emulator/gameview.go | 2 -- handler/room/room.go | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/emulator/gameview.go b/emulator/gameview.go index c9e96c17..28051fa8 100644 --- a/emulator/gameview.go +++ b/emulator/gameview.go @@ -3,7 +3,6 @@ package emulator import ( "image" - "log" "github.com/giongto35/cloud-game/emulator/nes" ) @@ -160,7 +159,6 @@ func (view *GameView) Load(path string, extraLoadFunc func() error) { func (view *GameView) UpdateEvents() { // If there is saving event, save and discard the save event - log.Println(view.savingJob) if view.savingJob != nil { view.console.SaveState(view.savingJob.path) // Run extra function (online saving for example) diff --git a/handler/room/room.go b/handler/room/room.go index 6f35f8e6..2797a755 100644 --- a/handler/room/room.go +++ b/handler/room/room.go @@ -143,7 +143,6 @@ func (r *Room) Close() { func (r *Room) SaveGame() error { onlineSaveFunc := func() error { // Try to save the game to gCloud - // TODO: Add goroutine if err := r.onlineStorage.SaveFile(r.director.GetHash(), r.director.GetHashPath()); err != nil { return err } @@ -160,8 +159,9 @@ func (r *Room) SaveGame() error { } func (r *Room) LoadGame() error { + // TODO: Fix, because load game always come to local, this logic is unnecessary. Move to load game onlineLoadFunc := func() error { - // TODO: Put in GoRoutine + log.Println("Loading game from cloud storage") // If the game is not on local server // Try to load from gcloud data, err := r.onlineStorage.LoadFile(r.director.GetHash())