Untitled

 avatar
unknown
plain_text
22 days ago
1.2 kB
5
Indexable
#include <vector>
#include<iostream>
#include <string>

enum class position{
    QB,
    RB,
    TE,
    WR
};


struct GameInfo{
    int PlayerScore = 0;
    int CompScore = 0;
    int down = 1; 
    int yards = 0;

};


struct Player{


    position::Position;
    std::string name;
    std::string team;
    int jerseynumber;
    int rating;
    int passing_yards = 0;
    int pass_attempts = 0;
    int pass_complesions = 0;
    int rushing_yards = 0;
    int rush_attempts = 0;
    
};

struct Team{
    std::string name;
    std::vector<Player> roster;
};

enum class PlayType{
    run,
    rush
;}


void DisplayPossession(const Team& team);

void DisplayDownsandYards(const GameInfo& gameinfo);


PlayType ChoosePlayType(const Team& team);

double PassVsRushProb(const Team& team);

Player chooseRunner( Team& team);

Player chooseReciever(Team& team);

double PassSuccessProb(const player& QB, const player& reciever);
double RunSuccessProb(const player& QB, const player& runner);

void UpdateGame(Scoreboard& scoreboard, int yardsGained);

void UpdateGame(Scoreboard& scoreboard);
void UpdatePlayer(Player& player);
Editor is loading...
Leave a Comment