Exemple #1
0
        public Game()
        {
            currentThrow = new Throw();
            frames = new Frame[10];
            frame = new Frame(1);
            frames[0] = frame;
            throwCommand = new RelayCommand(ThrowCurrent);

            for (var i = 1; i < frames.Length; i++)
            {
                frames[i] = new Frame(i + 1);
                frames[i - 1].Next = frames[i];
                frames[i].Previous = frames[i - 1];
            }
        }
Exemple #2
0
 public Int32 ScoreAtFrame(Int32 frame)
 {
     frame = Math.Min(Math.Max(1, frame), frames.Length);
     return frames[frame - 1].TotalScore;
 }
 public void Setup()
 {
     f = new Frame();
 }