示例#1
0
文件: Player.cs 项目: nichdu/jeopardy
 public Player(Player previous)
 {
     _name = previous._name;
     _score = previous._score;
     _color = previous._color;
 }
示例#2
0
文件: Form1.cs 项目: nichdu/jeopardy
 private void constr(string jgPath, string player0Name, string player1Name, string player2Name)
 {
     InitializeComponent();
     game = JeopardyGame.GetInstance(jgPath);
     this.updateCategories();
     _players = new Player[3];
     _players[0] = new Player(player0Name, Color.Red);
     _players[1] = new Player(player1Name, Color.Lime);
     _players[2] = new Player(player2Name, Color.DeepSkyBlue);
     this.updatePlayerNames();
     this.resetScore();
     iterateButtons();
     _defaultButtonColor = cat1_100.BackColor;
 }
示例#3
0
 public void SetPlayer(int id, string name)
 {
     if (id >= _players.Length)
     {
         throw new IndexOutOfRangeException("Spieler-ID darf nicht größer als " + id + " sein.");
     }
     _players[id] = new Player(name, _colors[id]);
 }