예제 #1
0
        private void OnCellPressed(string point)
        {
            var gamePoint = GamePoint.Parse(point);

            Move(gamePoint);
            var winnerLine = _game.WinnerLine();

            if (winnerLine != null && winnerLine.Length > 0)
            {
                foreach (GameLinePoint linePoint in winnerLine)
                {
                    GetCell(linePoint.Point).IsWinner = true;
                }
                var winner = winnerLine[0].MoveType;
                _dialogService.Show(string.Format("{0} WIN!", winner));
                _gameOver = true;
            }
        }
예제 #2
0
        private bool OnCanCellPressed(string point)
        {
            var gamePoint = GamePoint.Parse(point);

            return(!_gameOver && _game.CanMove(gamePoint));
        }