Update comments

This commit is contained in:
giongto35 2019-05-04 17:52:46 +08:00
parent e79e655112
commit cf4dadc1d9
2 changed files with 2 additions and 4 deletions

View file

@ -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)

View file

@ -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())