private async void Assistant_Controller_GamePhaseStarted(object sender, IGamePhase e) { if (e.Type == GamePhaseType.LifeDeathDetermination) { if (ProvidesFinalEvaluation && !_isOnlineGame) { var deads = await GetDeadPositions(); foreach (var dead in deads) { _uiConnector.RequestLifeDeathKillGroup(dead); } } } }
//////////////// // State Changes //////////////// protected override void OnBoardTapped(Position position) { // If the analyze mode is enabled handle it and return if (IsAnalyzeModeEnabled) { AnalyzeBoardTap(position); return; } // Otherwise do a normal move if (IsTimelineInPast) { return; } if (Game?.Controller.Phase.Type == GamePhaseType.LifeDeathDetermination) { UiConnector.RequestLifeDeathKillGroup(position); } else { UiConnector.MakeMove(position); } }
private void bMakeMove_Click(object sender, EventArgs e) { string coordinates = tbInputMove.Text; Position position; try { position = Position.FromIgsCoordinates(coordinates); } catch { MessageBox.Show("Those are not valid coordinates."); return; } if (_gamePhase == GamePhaseType.LifeDeathDetermination) { _uiConnector.RequestLifeDeathKillGroup(position); } else { groupboxMoveMaker.Visible = false; (PlayerToMove.Agent as IHumanAgentActions).PlaceStone(position); } }