public Form1() { InitializeComponent(); game = new Game(15, 10,timer1); this.DoubleBuffered = true; timer1.Interval = MaxTime; bpf = new BestPlayersForm(); bestPlayer = bpf.bp.getBestPlayer(); bestScoreLbl.Text = bestPlayer.Points.ToString(); }
private void gameOver() { timer.Stop(); gameState = new GameOverState(this); PlayerNameForm pn=new PlayerNameForm(); if (DialogResult.OK == pn.ShowDialog()) { player.Name = pn.Ime; player.Date = DateTime.Now; BestPlayersForm bp = new BestPlayersForm(player); bp.Show(); } }
private void btnScores_Click(object sender, EventArgs e) { bpf = new BestPlayersForm(); bestPlayer = bpf.bp.getBestPlayer(); bpf.ShowDialog(); }