Exemplo n.º 1
0
        public void Play(Player p, int x, int y)
        {
            if (!IsValidPlay(p, x, y))
            {
                return;
            }

            var list = MakeListOfConvertedTokens(p, x, y);

            if (list.Any())
            {
                PutTokens(p, list);
                HandlePlayerChange();
                if (SnapshotContainer != null)
                {
                    SnapshotContainer.TakeSnapShot(new OnePartTurn()
                    {
                        Coord = new Coord(x, y), PlayerThatPlayed = p, PlayerToPlay = CurrentPlayer, Board = board.Clone()
                    });
                }
            }
        }