Esempio n. 1
0
        private bool Update(Direction dir)
        {
            ulong score;
            bool  isUpdated = DR.Update(this.Board, dir, out score);

            this.Score += score;
            return(isUpdated);
        }
Esempio n. 2
0
        private bool IsDead()
        {
            ulong score;

            foreach (Direction dir in new Direction[] { Direction.Down, Direction.Up, Direction.Left, Direction.Right })
            {
                ulong[,] clone = (ulong[, ])Board.Clone();
                if (DR.Update(clone, dir, out score))
                {
                    return(false);
                }
            }
            return(true);
        }