Package hockey.api
Welcome to the contest, please read the description!
See:
Description
Interface Summary |
IGoalKeeper |
An IObject representing a goal-keeper on the ice. |
IGoalKeeperControl |
An interface to goal-keeper control. |
IObject |
An object on the ice. |
IPlayer |
An IObject representing a player on the ice. |
IPlayerControl |
An interface to player control. |
IPuck |
An IObject representing a puck on the ice. |
ITeam |
Your team should implement this interface!
|
Class Summary |
GoalKeeper |
The goal-keeper in your team should extend this class!
|
Player |
Every player in your team should extend this class!
|
Position |
An IObject implementation that represents a position
on the ice. |
Util |
The class Util contains methods for performing basic
numeric operations such as the elementary squaring, euclidean distance,
angle conversion, trigonometric functions in degrees and clamping. |
Package hockey.api Description
Welcome to the contest, please read the description!
The Game
The game is hockey, the objective is to score...
Cheating is forbidden. Cheating, or attempts to cheat, leads to
disqualification.
Note! You may NOT use java.lang.System
.
Rink measurements, coordinate system and units
Official measurements of a swedish ice hockey rink:
- 3A is 5200 cm, so A is approximately 1733 cm, but 3A/2 is exactly 2600 cm
(the distance from the centre line to the goal line).
- Goals are about 180 cm wide, but the goal area's diameter is 360 cm.
The game's coordinate system has its origin in the centre spot on the ice.
- The x-axis is along the long side of the rink, positive towards your
opponent's goal.
- The y-axis is along the short side of the rink, positive to your
goal-keeper's right.
- Angles are relative to the x-axis, positive towards the y-axis.
Basic units of the game are:
- cm - distances and coordinates in centimetres.
- s - time in seconds.
- degrees - angles in degrees.
Derived from these are units for speed, acceleration and turn speed:
- cm/s - speed in centimetres per second.
- cm/s^2 - acceleration in centimetres per second square.
- degrees/s - turn speed in degrees per second.
Short approximate conversion table for speed:
cm/s | km/h | m/s
|
---|
444 | 16 | 4.44
|
1000 | 36 | 10.00
|
1111 | 40 | 11.11
|
2777 | 100 | 27.77
|
4444 | 160 | 44.44
|
Player control and specifications
All moving objects on the ice are modelled as circles, even if they are not
drawn like that. The stick is controlled relative to the player's centre,
but is drawn from the front of the player to a position a bit behind and
further away from where the puck is held.
Physical specifications
There are four types of solid objects in the game:
- Players (with one exception, see below).
Property | Value (regular player/goalkeeper)
|
---|
Width (cm) | 70/80
|
Mass (kg) | 75/150 (yes, he's a steady fellow!)
|
Acceleration (cm/s^2) | 444
|
Angular acceleration (deg/s^2) | 720
|
Some of these, and several more properties of a player can be found in
the Player API.
Note!! Due to the mysterious magical energies flowing from
somewhere near your goalcage, your players (except the goalkeeper in
his special magic armour) are not solid with respect to the puck
within your own goalzone.
The puck
Property | Value
|
---|
Width (cm) | 7.5
|
Mass (kg) | 0.170
|
The goal cages
Players, as well as the puck, bounce against the interior as well as
the exterior of the goal cages.
The rink
Players, as well as the puck, bounce against the rink.
Collisions between these solid objects occur more or less according to the
laws of physics. As mentioned above, the players (and of course the
puck) are modelled as circles.
Rules
The folowing rules are judged by the game:
- Offside - an attacking player may not arrive
before the puck into the attack zone (over the far blue line).
- Icing - the puck may not shoot the puck from
his own half of the rink past his opponent's goal line, except if he
scores or the puck passes through the goal area.
- Blocking - the puck may not be immobile
for more than a couple of seconds.
- Interference - a player slams the opponent goal keeper with
a speed that exceeds a certain threshold. A player breaking this rule gets penalised for 10 seconds.
- Boarding - a player slams an opponent player into the rink
with a speed that exceeds a certain threshold. A player breaking this rule gets penalised for 10 seconds.
Offside | Icing
|
---|
 |
|
---|
A strong recommendation
(from our experiences of similar contests)
Plan realistically! Implement something simple that works, to get a
feel for the system, then proceed with your masterplan. It's much
more fun watching a working team afterwards!
Disclaimer
Although this game tries to emulate a fast and simplified version of
real hockey, it is in no way guaranteed to be faithful to reality.
In all cases the game's decisions are valid. Your objective is to
write a good team in this game, as it is.
Good Luck!
Now read through the rest of the API! :)