コード例 #1
0
ファイル: HighScoreGame.cs プロジェクト: rocketreal/Pikachu
        public static void WriteNewScore(Player player, int kind)
        {
            List_highscore ls = HighScoreGame.ReadHighScore();

            if (kind == 1)
            {
                ListPlayer p = ls.player_easy;
                p.player[9] = player;
                ls.player_easy.sort();
                WriteHighScore(new List_highscore(p, ls.player_mid, ls.player_hard));
            }
            else if (kind == 2)
            {
                ListPlayer p = ls.player_mid;
                p.player[9] = player;
                ls.player_mid.sort();
                WriteHighScore(new List_highscore(ls.player_easy, p, ls.player_hard));
            }
            else
            {
                ListPlayer p = ls.player_hard;
                p.player[9] = player;
                ls.player_hard.sort();
                WriteHighScore(new List_highscore(ls.player_easy, ls.player_mid, p));
            }
        }
コード例 #2
0
ファイル: Player.cs プロジェクト: rocketreal/Pikachu
 public Player(Player a)
 {
     this.name = a.name;
     this.king_of_game = a.king_of_game;
     this.score = a.score;
     this.Level = a.Level;
     this.hour = a.hour;
     this.minute = a.minute;
     this.second = a.second;
 }
コード例 #3
0
ファイル: HighScoreGame.cs プロジェクト: rocketreal/Pikachu
 public static void WriteDefault()
 {
     Player[] player_easy = new Player[10];
     Player[] player_mid = new Player[10];
     Player[] player_hard = new Player[10];
     for (int i = 0; i < 10; i++)
     {
         player_easy[i] = new Player("UIT", "Medium",i/2+1, i * i * 15, 1, i * 4, i * 3);
         player_mid[i] = new Player("POKEMON AWARE", "Hard",i/2+1, i * i * 22, 1, i * 6, i * 5);
         player_hard[i] = new Player("UIT POKEMON Champion", "Hardest",i/2+1, i * i * 23+ 50, 1, i * 5, i * 6);
     }
     ListPlayer list_easy = new ListPlayer(player_easy);
     ListPlayer list_mid = new ListPlayer(player_mid);
     ListPlayer list_hard = new ListPlayer(player_hard);
     list_easy.sort();
     list_mid.sort();
     list_hard.sort();
     WriteHighScore(new List_highscore(list_easy, list_mid, list_hard));
 }
コード例 #4
0
ファイル: ListPlayer.cs プロジェクト: rocketreal/Pikachu
 public void swap(int i, int j)
 {
     Player a = new Player(player[i]);
     Player b = new Player(player[j]);
     player[i] = new Player(b);
     player[j] = new Player(a);
 }
コード例 #5
0
ファイル: ListPlayer.cs プロジェクト: rocketreal/Pikachu
 public ListPlayer(Player[] play)
 {
     this.player = play;
 }