public bool DestroyGame() { if (CurrentGame == null) { return(false); } if (GameTickLoop == null) { return(false); } CurrentGame = null; GameTickLoop.Stop(); GameTickLoop = null; return(true); }
public bool ConstructGame() { if (CurrentGame != null) { return(false); } if (Debug_PictureBox != null) { CurrentGame = new MemoryGame(WebBrowser, "#game1 > canvas", Debug_PictureBox); } else { CurrentGame = new MemoryGame(WebBrowser, "#game1 > canvas"); } GameTickLoop = new GameTickLoop(CurrentGame, 1600); return(true); }