예제 #1
0
 public void Handle(IHaveThisNumber message)
 {
     sudokuBoard[message.Row - 1, message.Column - 1] = message.Number;
     Console.Clear();
     PrintBoard();
     --valuesLeft;
     if (valuesLeft == 0)
     {
         Console.WriteLine("DONE!");
     }
 }
예제 #2
0
        private void WhenHaveCellValue()
        {
            if (cellNumber.HasValue && !isSolved)
            {
                isSolved = true;
                IHaveThisNumber message = new IHaveThisNumber(cellNumber.Value, rowIndex, columnIndex);

                BroadcastMessage(message);
                Context.Parent.Tell(message);
                printerActor.Tell(message);

                Context.Stop(Self);
            }
        }
예제 #3
0
 private void Handle(IHaveThisNumber message)
 {
     gameBoard[message.Row - 1, message.Column - 1] = message.Number;
 }