版本比较
Upd 【官方】英超小游戏V1.0.3
正文
增加 13 行删除 13 行
22 行未改动232425262727282930319 行未改动4142434445454647484956 行未改动106107108109110111110111112113114115116117115116117118119120121122121122123124125126127128126127128129130131132136 行未改动全部展开269270271272273273274275276277363 行未改动全部展开22 行未改动#include <cstdlib>#include <ctime>#include <random>#include <algorithm>#include <iomanip> #include <iomanip>#include <thread>#include <chrono>using namespace std;
9 行未改动#include <cstdlib>#include <ctime>#include <random>#include <algorithm>#include <iomanip> #include <iomanip>#include <thread>#include <chrono>#include <termios.h>#include <unistd.h>56 行未改动 } sort(temp_team + 1, temp_team + 1 + 20, cmp);
// 使用 setw 设置场宽 cout << left << setw(5) << "Rank" << setw(20) << "Team" 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) << "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 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 << 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)";136 行未改动全部展开 team[oponment].lose += my_points; if(team[cli_team].money>=0-(my_points-you_points)){ cout<<endl<<"You lose youself "<<0-(my_points-you_points)<<" M€!"<<endl; team[cli_team].money+=my_points-you_points; } } pressAnyKeyToContinue(); clearScreen(); } }363 行未改动全部展开