Beispiel #1
0
 void CreateTowers()
 {
     visualTowers = new VisualTower[3];
     for (int i = 0; i < 3; i++)
     {
         visualTowers[i] = new VisualTower(panels[i], this, game.blockCount);
     }
 }
Beispiel #2
0
 public void Visualize(HanoiGame.MoveInfo move)
 {
     for (int i = 0; i < 3; i++)
     {
         VisualTower visualTower = visualTowers[i];
         for (int t = 0; t < game.blockCount; t++)
         {
             Block block = move.towers[i][t];
             if (block == null)
             {
                 continue;
             }
             visualTower.PlaceBlock(blockInfos[block.size - 1], t);
         }
     }
     currentMove = move;
 }