public void Start() { CurrentPlayer.Set(Get(DefaultPlayer)); for (int j = 0; j < 3; ++j) { for (int i = 0; i < 3; ++i) { var cell = new Cell() { Owner = new PlayerOutput(), Position = new Vector3(i, j, 0), }; Board.Add(cell); cell.Owner.Subscribe(CheckWinner); } } }
private void CheckWinner() { Winner.Set(FindWinner()); }