コード例 #1
0
 public void ResetGame()
 {
     _game    = new Game();
     _boardUI = new BoardUI(_game.Board);
     moveHistory.Reset();
     _game.GameEvent += UpdateGameState;
 }
コード例 #2
0
 private void OnEnable()
 {
     Message.Subscribe <UndoRequested>(_ => history.Undo(), this);
     Message.Subscribe <LevelReset>(_ => history.Reset(), this);
     Message.Subscribe <PieceMoved>(p => history.Add(p), this);
 }