Safe Haskell | None |
---|
- initializeTankState :: Float -> Float -> Float -> TankState
- initializeTank :: Float -> Float -> Float -> Float -> Color4 Float -> Int -> [Integer] -> Tank
- launchWeapon :: WeaponGraphics -> Tank -> [[Tile]] -> Float -> WeaponGraphics
- decreaseWeaponCount :: Tank -> Tank
- tankVelocity :: Float
- updatePosition :: Point -> Float -> Key -> Point
- updatePower :: Float -> Key -> Float
- updateAngle :: Float -> Key -> Float
- updateDirection :: Direction -> Key -> Direction
- updateWeaponChoice :: Int -> Key -> Int
- updateTank :: Tank -> Key -> [[Tile]] -> Tank
- updateGameStateLaunchWeapon :: GameState -> GameState
- updateGameStateTank :: GameState -> Key -> GameState
- updateTankGravity :: GameState -> GameState
Documentation
initializeTankState :: Float -> Float -> Float -> TankState #
Function to initialize the state variables of the tank
initializeTank :: Float -> Float -> Float -> Float -> Color4 Float -> Int -> [Integer] -> Tank #
Function to initialize all the properties of a tank
launchWeapon :: WeaponGraphics -> Tank -> [[Tile]] -> Float -> WeaponGraphics #
Function responsible for launching a weapon. It takes a weapon, tank, the tile map and the start velocity and returns the launched weapon
decreaseWeaponCount :: Tank -> Tank #
Function to change the weapon count of the tank. It accepts a tank and returns a tank with the modified weapon count
tankVelocity :: Float #
To represent the velocity given to a tank on pressing a movement key
updatePosition :: Point -> Float -> Key -> Point #
Function to accept the position, angle of inclination and key press and return the new position of the tank
updatePower :: Float -> Key -> Float #
Function to accept the power and key press and return the new power of the tank
updateAngle :: Float -> Key -> Float #
Function to accept the angle of inclination and key press and return the new angle of inclination of the tank
updateDirection :: Direction -> Key -> Direction #
Function to accept the direction and key press and return the new direction of the tank
updateWeaponChoice :: Int -> Key -> Int #
Function to accept the current weapon selected and the key press and return the new weapon to be selected for the tank
updateTank :: Tank -> Key -> [[Tile]] -> Tank #
Function to update the parameters of a tank after a key press
updateGameStateLaunchWeapon :: GameState -> GameState #
Function to update the game state after current player launches the weapon
updateGameStateTank :: GameState -> Key -> GameState #
Function to update the game state when player moves the tank
updateTankGravity :: GameState -> GameState #
Function to update the game state after applying the effects of gravity on all the tanks