Remove game in local check in director

This commit is contained in:
giongto35 2019-05-05 23:25:27 +08:00
parent 08f9654dd5
commit c797b76ab6

View file

@ -3,7 +3,6 @@ package emulator
import (
"image"
"log"
"os"
"time"
"github.com/giongto35/cloud-game/emulator/nes"
@ -112,12 +111,6 @@ func (d *Director) PlayGame(path string) {
d.SetView(NewGameView(console, path, hash, d.imageChannel, d.audioChannel, d.inputChannel))
}
func (d *Director) IsGameOnLocal(path string, roomID string) bool {
hash, _ := hashFile(path, roomID)
_, err := os.Open(savePath(hash))
return err != nil
}
// SaveGame creates save events and doing extra step for load
func (d *Director) SaveGame(saveExtraFunc func() error) error {
if d.hash != "" {