Beispiel #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();

            if (f.qualified)
            {
                if (f.AIplayer[0].isBust && f.AIplayer[1].isBust && f.AIplayer[2].isBust
                    && f.AIplayer[3].isBust)
                {
                    NextRound form10 = new NextRound(f);
                    form10.Show();
                    return;
                }
                else
                {
                    f.StartHand();
                    return;
                }
            }

            else
            {
                f.Qualification();
                return;
            }
        }
Beispiel #2
0
 // Update is called once per frame
 void Update()
 {
     if (NextRound.roundNo == 6 && !endGame)
     {
         score.text = (NextRound.getScore()).ToString();
         endGame    = true;
     }
 }
Beispiel #3
0
 // Start is called before the first frame update
 void Start()
 {
     moveUnits   = GameObject.Find("UnitManager").GetComponent <MoveUnits>();
     nextRound   = GameObject.Find("Next Round").GetComponent <NextRound>();
     handofCards = GameObject.Find("CardManager").GetComponent <HandofCards>();
     mana        = GameObject.Find("MapManager").GetComponent <Mana>();
     cardPick    = GameObject.Find("CardManager").GetComponent <CardPick>();
     this.GetComponent <Button>().onClick.AddListener(PickCard);
 }
Beispiel #4
0
 public void AskNextRound()
 {
     lock (_moveLock)
     {
         if (NextRound?.CanExecute(null) == true)
         {
             NextRound.Execute(null);
         }
     }
 }
Beispiel #5
0
 private void Ball_StoppedMoving(object sender, BallEventArgs e)
 {
     if (e.BallOnRightSide)
     {
         ScorePoint("PlayerOne", ++playerOne);
         NextRound?.Invoke("PlayerOne");
     }
     else
     {
         ScorePoint("PlayerTwo", ++playerTwo);
         NextRound?.Invoke("PlayerTwo");
     }
 }
Beispiel #6
0
 private void GameClientOnNextRound(NextRound nextRound)
 {
     _currentPlayerId = nextRound.PlayerId;
     _gameView?.NextRound();
 }
Beispiel #7
0
 private void OnNextRound(NextRound nextRound)
 {
     NextRound?.Invoke(nextRound);
 }
Beispiel #8
0
        // begin new round of tournament
        public void StartRound()
        {
            if (round > 0)
            {
                NextRound form10 = new NextRound(this);
                form10.Show();
                //return;
            }

            round++;

            if (round > 5)
                DetermineGameWinner();

            newGame = true;
            ResetAllPlayers();

            CreateAIPlayers(1, 30);  // creates the AI players

            ante = ante + 5;

            InitializeGameUI();

            StartHand();
        }
Beispiel #9
0
 private void Start()
 {
     nextRound   = GameObject.Find("Next Round").GetComponent <NextRound>();
     handofCards = GameObject.Find("CardManager").GetComponent <HandofCards>();
 }