You are free to to use, copy, modify, merge, publish, distribute, this code only for non-commercial use.

The above notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Acknowledgements
· Lachie Dazdarian - for his tutorials about creating a game in FB
· I3I2UI/I0 for his very useful code tips and cleanup
· The Fbgfx developers
· The FreeBasic Developers
· The FBIde Developers
· All the followers of the http://www.freebasic.net/forum/viewtopic.php?f=15&t=20637 thread

'TODO LIST -------------------------------------
· MATCH EVENTS
· cleanup code (heavy work!) :(
· better ball physics
· reach top speed
· IMPROVE AI (sooo much!)
· commenting the code better
· matchtime and half-time field switch
· Human vs Human
· Replais
· FPS limit
· Delta timing
· Use of custom font
· dedicated AI for the GK - jump, hold the ball
· GAME MENU
· 3 kind of skin for the player
· goalkeeper with a custom kit
· Screenshot
· Game menu :) - maybe fantastic!
· change other #define with consts

DEV LOG -------------------------------------
0.21
· minor changes on update_match_event() SUB
· less code for the draw_players() SUB
· the Goalkeeper can catch the ball
· minor changes on update_players() SUB
· added check_throw_in_corner_kick() SUB
· code cleanup
· Z sorting of the ball (see draw_players() SUB for details)
· better throw in routine
· Gk smarter on corner kicks and throw in
· added is_ball_into_opponent_penalty_area() FUNCTION
· added is_pl_into_opponent_penalty_area () FUNCTION
· in debug mode

0.20.5
· works with the new Freebasic compiler's release (0.90.1)
· changed check_ball_border... in check_ball_goals SUB
· added update_match_events SUB <- IMPORTANT ADD
· minor changes on get_ball_tile function
· added move_player SUB
· added move_all_players SUB
· added run_tactic_all_players SUB
· added check_Ball_goals SUB
· added check_Ball_limits SUB
· added restore_player_speed SUB
· added reset_gk_net_position SUB
· minor changes on draw_pitch() SUB
· minor changes on get_pl_behavior()SUB
· less sprites for the falling animation
· fouls, throw in, corner kicks

0.20
· added main menu (update_main_menu and draw_main_menu SUBS)
· added get_pl_to_pass FUNCTION - useful to the human player to perform a precise passage
· changed the is_ball_controllable_by_human FUNCTION
· changed the get_user_input_action SUB
· added training mode & training mode with debug
· minor changes on gk smart
· some code cleanup
· usage of enums for match_events and pl_action
· SUBS have been alphabetically ordered
· minor changes on get_user_input_ways SUB - usage of consts for pl(c).rds
· match may be paused pressing "P" key (but the timing is not stopped yet)
· on screen debug may be activated/deactivated pressing "D" key
· changed get_passing_ball_speed FUNCTION

0.19.5
· only one key for kicking, passing, heading & tackling - at this moment the control key (see get_user_input_action SUB for details)
· changed the get_user_input_action SUB
· changed the get_user_input_ways SUB
· Vertical visualization instead of the horizontal view.
· minor changes on Gk smart (Him is still very stupid)
· changed get_endline_pl_to_pass SUB - fixed an error, now the SUB is simplest
· Redrawed nets
· added is_in_pl_fieldview FUNCTION - useful to check if a pl (human controlled) can pass to another
· the user can choice if watch the match or play the match… or exit
· Timer on match - no more than 3 mins of gameplay

0.19
· changed get_passing_ball_speed function
· minor changes on Gk smart
· changed get_user_input sub
· added human control for team 0 - cursor keys and keys Q to crossing / sliding, W to pass, E to kick / headkick
· added is_slidable FUNCTION - useful to check if the selected player can perform a slide
· added is_headkickable FUNCTION - useful to check if the selected player can perform a headkick
· added run_tactic SUB
· added get_user_input_action SUB
· added get_user_input_ways SUB
· added is_ball_controllable_by_human FUNCTION - useful to check if the selected human player can play the ball
· only the Esc key allow to exit from the program
· added show_intro SUB
· new const _2PI8 - is the double of PI
· custom kit for the goalkeeper
· press Z key to show debug values
· another colored ring under the pl_ball_owner_id player

0.18.5
· Massive use of consts instead of #define
· Integer Variable Type instead
  of Byte, Ubyte, Uinteger
· The player who is performing an headkick may also fall after
· Sprites for the Goalkeeper
· Goalkeeping status
· added Check_bitmap SUB to check if the sprites have been rightly loaded (it is commented so you don't have to compile it)
· Also the socks of the player may be painted with a customized color (see Paint_kit SUB)
· Goalkeeper has a little better smart (also if is still very stupid)… him doesn't jump if his team is the ball owner
· Changed the get_endline_pl_to_pass SUB
· Sqr(((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2))) instead of sqr(((x1-x2)^2)+((y1-y2)^2)) for a faster computing (thanks again to I3I2UI/I0)
· draw_aknowledgements() SUB

0.18
· Try to try to catch the ball with SLIDING only if the pl slider is not receiving the ball and if the ball distance is into a specified min max range
· Goalkeeper area lines (thanks to I3I2UI/I0)
· changed load_bitmap SUB
· changed update_player SUB
· Now JASC needs only one pl_sprite bitmap
· created Paint_kit SUB   useful to fill the team kits with a custom color
· Headkicks sprites
· Headkicking status for the player

0.17.5
· added sliding sprites
· added sliding status for the players
· modified check_pl_collisions sub
· modified update_players sub
· added delete_bitmap sub · changed some Gk smarts
· game may be righlty closed  by clicking on the X button of the window

0.17
· added is_on_camera_crop sub to spend less CPU time for drawing sprites
· added pl.action & pl.active to the player_proto type (useful to perform fallings, slides etc…)
· new sprites  for the pitch, the players and the nets
· fixed get_tact_tile sub
· better tactic - based upon 442 module
· collision check between players who are on camera crop

0.16
· The FIRST public release

0.06
· clean up code
· Function get_2nd_pl_to_pass