/Football-Manager

My personal football game, created using C++. (Under development, almost complete).

Primary LanguageC++

Rules of the game :

  1. The entire football ground is divided into 32 parts, starting with 0 at one goal post, and 32 at the other. The centre line is marked as 16. The marking is done longitudinally along the length of the ground.
  2. The computer first asks you about the names of the two teams that will play; your team, and the CPU'S team. Then, The coin toss occurs, where you will be asked about head or tail. Randomly, one of the sides will fall, and the CPU will inform you about the outcome. The winning side chooses to decide whether he will go from 16 to 32, or from 16 to 0.
  3. Let us consider that you start, and choose 16 to 32. Then, you are allowed to write any one of the numbers 1,2,3,4. The computer will also randomly generate his no. between 1,2,3,4. If they do not match, then you will have that amount of number, added to it. Eg: If you write 3, and the CPU guesses 4,2 or 1, then ur score will be 16+3=19.(since you are going from 16 to 32. If you would have chosen 16 to 0, then your score will be 16-3=13). SO, now your score is 19. You see, you are closer to the goal,32. Again you guess a number, and the computer guesses one. If they do not match, you advance on the pitch . If they match, the ball is in the CPU's feet and he will start playing from 19 towards 0, since his goal is at 0.Now you try and guess what might be his move, and try to ruin his move..!!
  4. Out of those 1,2,3,4 passing moves, here is what they indicate :
        • 4 means a long pass, like what they play in Real Madrid, or counter attacking teams.
        • 3 means a medium length pass.
        • 1 and 2 can be alternatively used for dribbling or short pass. If you want to make a short pass, write "1 s", or "2 s", s stands for short pass.
        • For dribbling, you have two options again, 1 or 2. If you want to dribble like Messi , try and devise a sequence of 1, and 2, such that your number doesn't match with what the CPU is guessing each time. Clearly, you need practise. Just like Messi..!!
        • You can either perform skills while dribbling or just do body feints and rush past the defenders. Just write " 1 CODE", or "2 CODE", where CODE stands for the number sequence representing your skill move. Just like FIFA…!!

Tip : Use your numpad, for the skills.

4 - feint(left)

6 - feint(right)

464 - Stepover left

646 - Stepover right

446 - Ronaldo chop(right)

664 - Ronaldo chop(left)

82 - Heel Flick

282 - Rainbow

2486 - Roulette(left)

2684 - Roulette(right)

246 - Elastico(right)

264 - Elastico(left)

24426 - Hocus Pocus

882 - Sombrero flick

84 - Berba spin

Use these, and baffle the computer..!!

  1. Now comes the shooting part. Consider that while passing the ball, your score is or crosses 29, if you are heading towards 32, or it is or crosses 3, if you are heading towards 0. Only now, you will get a shooting opportunity. You will have two options: 5 or 6. If your chosen number matches with the computer, he saved your shot..!! Better luck next time. The game starts with a goalkick. But if doesn't match, you scored..!! Well done. The other team takes the centre. Same goes with the case of saving. If the computer enters the shooting region, its your task to save it, or concede a goal.

  2. Clearly, the distance of the point of shooting from the goal determines if it was a bullet shot ripping the net, or a clinical tap in .

     29 - long ranger, powerful shot
    

30 - well placed medium paced shot

31 - from inside the D box

32 - clinical tap in or head

  Based on the distance, you have to fdetermine and play out specific kinds of              shot. Write "5 CODE" or "6 CODE", where CODE stands for the character sequence beside your selected shot type.

Tip : Use the numpad..!!

    • For 29 :

    p - powerful shot(bullet)

    k - knuckleball

    • For 30 :

    p - powerful(bullet)

    k - knuckleball

    v - volley

    f - finesse shot

    • For 31 :

    p - powerful shot

    m - medium paced placed shot

    v - volley

    c - chip shot

    bc - bicycle kick

    bv - back volley

    scr - scissor kick

    t - tap-in

    f - finesse shot

    • For 32 :

    Everything included for 31, and.

    sc - Scorpion kick

    r - Rabona

    fl - flick

    bh - backheel

    to - toe kick

  1. For goal kicks, as the keeper has the liberty to pass the ball, or take a long shot, he can play any one of 1 to 6. That is, you can take any one of 1 to 6. But if your number, matches with the CPU number, CPU has the ball in its feet, and he will start from 28, or 4, according to the situation. Likewise is the case, if the CPU is taking the goal kick.

  2. If any of the teams concede a goal, the conceded team starts the game from 16, i.e. takes centre.

  3. Now comes the freekick portion. Consider, by mistake, you write a number, other than 1,2,3 or 4 while passing. It will be considered a foul, and the opponent will get a freekick. The CPU will have 3 options: 4,5 or 6. If it matches with the CPU's number, you scored. If not, then your shot is saved or off target according to the difference between the numbers.

If the absolute difference between your number and the CPU number is 1, the shot is saved by the goalkeeper. But if the difference is 2, then the shot is either blocked by the wall, or is off target. Poor fellow..!!

You have to specify the type of free kick you want to take, by writing "(4,5, or 6) CODE", where CODE is the string sequence representing your type of free kick :

c : curler

k : knuckleball

d : dip

p : power shot

  1. If the team commits this error when the opponent team is in the last 5 strides from goal, meaning, when the score is >=27, or <=5 accordingly, then penalty is awarded. It is just the reverse of free kick.You have 3 options :4,5 and 6. If it matches, then your shot is saved , else you scored. Better luck next time. This is made because a penalty, in general, is easy to score from than a free kick.

  2. Now comes the winning part. At the start of the game, the CPU will ask you about the maximum number of goals scored. Let it be n( min value of n is 3). That means, the first team to reach n number of goals is the winner.