CSE306  Processing Systems and Structures Lockwood, Spring 2003

Final Project : Penalty Kicks

Team Members
 Bill Ntwali: Movement and Player Display
 Chilumba Mubashi: Interrupts & Equations
 T.J Peterson: Graphics
 Jian Gao: Text Mode & Random Generation
Due Date
 28th April, 2003

Introduction

In the game of soccer, when both scores are tied there is a penalty kick off. This project will consist of a player kicking penalty kicks. The design is to have a player kicking the ball into the goal and a goalkeeper trying to catch the ball. Every time the ball goes into the goal, we update the score by 1 point on the kicker's team. If the kicker misses, we update the scoreboard with a zero for the kicker's team and a one for the goalkeeper's team. After five kicks, we will check the scoreboard to see which team won the game. Ex. If the kicker only makes 2 out of 5 kicks into the goal, the goalkeeper's team will have 3 points and the kicker's team will have 2 points. The score will show the goalkeeper's team won the game.

Implementation

Interrupts will be used for real-time calculations. The time interrupt will be used to allow position update so that the ball can move. Keyboard interrupts
by the arrow keys will be used for the goalkeeper's movements.
Our program will use both text and video modes.

Outline of the soccer field: 320 X 200 image

1: Kicker initial position
2: Ball initial position
3,4,5: Various goal keeper positions

Problem Description

One of the major hurdles we foresee is that of incorporating mode 13h since we have not formally covered the topic in detail in class.
Another bigger hurdle is that of putting all the project members procedures into complete code that will work.
A challenge we also see is that of having the ball move and at the same time have control of the goal keeper to move as well.

Equations and Calculations

From a given ball start position (position 1 on the diagram), a calculation has to be made to move the ball in a straight line to either the
left (position 4) the center  (position 3) or the right hand side (position 5). To calculate the position of the ball at each instant of time the
ball moved, the equation below would be use

            y = mx + c

where y is the horizontal position, m is the slope, x the vertical position, and c the y-axis intercept, which is just a constant. So depending
on the direction the ball is being kicked, y would be updated by the values of the variables calculated making a triangle.


Procedures