Beispiel #1
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (screwdriverIsMoving)
            {
                game.MoveScrewdriver();
            }
            else
            {
                game.ReturnScrewdriver();
            }

            if (game.CheckLockpickDurability())
            {
                game.NewLockpick();
                lockpicksUsed++;
                LockpicksUsedLabel.Text = "Lockpicks used: " + lockpicksUsed;
            }

            if (game.CheckLockState())
            {
                game.NewScrewdriverAndLock();
                score++;
                LocksOpenedLabel.Text = "Locks opened: " + score;
            }

            PlayingBoard.Refresh();
        }
Beispiel #2
0
 public Form1()
 {
     InitializeComponent();
     SetParameters();
     game.Start();
     PlayingBoard.Refresh();
     LockpicksUsedLabel.Text = "Lockpicks used: 0";
     LocksOpenedLabel.Text   = "Locks opened: 0";
 }
Beispiel #3
0
 private void PlayingBoard_MouseMove(object sender, MouseEventArgs e)
 {
     game.MoveLockpick(e.Location);
     PlayingBoard.Refresh();
 }