版本比较
英超小游戏 V1.0.4 (for windows)
正文
增加 13 行删除 13 行
28 行未改动2930313233343536373839404161 行未改动103104105106107108109110111112113114115116117118119120121122123124125126127128129227 行未改动全部展开357358359360361362363364365318 行未改动全部展开28 行未改动#include <cstdlib>#include <ctime>#include <random>#include <algorithm>#include <iomanip>#include <thread>#include <chrono>#include <windows.h>#define game_rand randusing namespace std;void clearScreen(){// std::cout << "\033[2J\033[3J\033[1;1H";61 行未改动}sort(temp_team + 1, temp_team + 1 + 20, cmp);// 使用 setw 设置场宽cout << left << setw(5) << "Rank"<< setw(20) << "Team"<< setw(6) << "Wins"<< setw(6) << "Draws"<< setw(6) << "Losts"<< setw(7) << "Goals"<< setw(7) << "Lose"<< setw(6) << "Points"<< setw(7) << "GD" << endl;for (int i = 1; i <= 20; i++) {cout << left << setw(5) << i<< setw(20) << temp_team[i].name<< setw(6) << temp_team[i].win<< setw(6) << temp_team[i].draw<< setw(6) << temp_team[i].lost<< setw(7) << temp_team[i].goal<< setw(7) << temp_team[i].lose<< setw(6) << temp_team[i].point<< setw(7) << (temp_team[i].goal - temp_team[i].lose);if (temp_team[i].name == team[cli_team].name) {cout << " (My team)";227 行未改动全部展开int roundIdx = r;for (int i = 0; i < 10; i++) {int home = history[roundIdx][i].home;int away = history[roundIdx][i].away;cout << team[home].name << "(rk. "<<get_rank(team[home].name)<<')' << " " << history[roundIdx][i].home_goal << "-"<< history[roundIdx][i].away_goal << " " << team[away].name << "(rk. "<<get_rank(team[away].name)<<')' << endl;}cout << endl;}318 行未改动全部展开28 行未改动2930313233343536373839404161 行未改动103104105106107108109110111112113114115116117118119120121122123124125126127128129227 行未改动全部展开357358359360361362363364365318 行未改动全部展开28 行未改动#include <cstdlib>#include <ctime>#include <random>#include <algorithm>#include <iomanip>#include <thread>#include <chrono>#include <windows.h>#define game_rand randusing namespace std;void clearScreen(){// std::cout << "\033[2J\033[3J\033[1;1H";61 行未改动}sort(temp_team + 1, temp_team + 1 + 20, cmp);// 使用 setw 设置场宽cout << left << setw(5) << "Rank"<< setw(20) << "Team"<< setw(6) << "Wins"<< setw(6) << "Draws"<< setw(6) << "Losts"<< setw(7) << "Goals"<< setw(7) << "Lose"<< setw(6) << "Points"<< setw(7) << "GD" << endl;for (int i = 1; i <= 20; i++) {cout << left << setw(5) << i<< setw(20) << temp_team[i].name<< setw(6) << temp_team[i].win<< setw(6) << temp_team[i].draw<< setw(6) << temp_team[i].lost<< setw(7) << temp_team[i].goal<< setw(7) << temp_team[i].lose<< setw(6) << temp_team[i].point<< setw(7) << (temp_team[i].goal - temp_team[i].lose);if (temp_team[i].name == team[cli_team].name) {cout << " (My team)";227 行未改动全部展开int roundIdx = r;for (int i = 0; i < 10; i++) {int home = history[roundIdx][i].home;int away = history[roundIdx][i].away;cout << team[home].name << "(rk. "<<get_rank(team[home].name)<<')' << " " << history[roundIdx][i].home_goal << "-"<< history[roundIdx][i].away_goal << " " << team[away].name << "(rk. "<<get_rank(team[away].name)<<')' << endl;}cout << endl;}318 行未改动全部展开