示例#1
0
文件: Cell.cs 项目: calielc/Mosaic
        public void Pick(ISaver saver, int order)
        {
            IsResolved = true;
            var choice = SelectFrame;

            double score;

            if (choice == null)
            {
                choice = _frames.OrderByDescending(frame => frame.Score).First();
                score  = choice.Score / 100d;
            }
            else
            {
                score = choice.Score;
            }

            using (var result = new LayerResult(_rect)) {
                result.Order = order;
                result.Name  = choice.Name;
                result.Score = score;
                choice.CopyTo(result);

                saver.Set(result);
            }
        }