Safe Haskell | None |
---|
- defaultStartVelocity :: Float
- genericImpactRadius :: Float
- initializeWeapon :: Float -> Float -> Float -> Float -> Float -> Color4 Float -> Color4 Float -> Vector3 Float -> Float -> Float -> WeaponGraphics
- updatePositionWeapon :: WeaponGraphics -> GameState -> [[Tile]] -> WeaponGraphics
- updateWeapon :: WeaponGraphics -> GameState -> [[Tile]] -> WeaponGraphics
- updateHealth :: Weapon -> Tank -> Tank
- updateGameStateWeapon :: GameState -> GameState
- noOfPlayerWithNoHealth :: [Tank] -> Int
- checkScore :: Tank -> Bool
- nextTankChance :: [Tank] -> Int -> Int -> Int
Documentation
defaultStartVelocity :: Float #
The defaultStartVelocity function sets the default start velocity for the bullet.
genericImpactRadius :: Float #
The genericImpactRadius function sets the default impact radius for the bullet.
:: Float | Initial Column Number in the tileMatrix |
-> Float | Initial Row Number in the tileMatrix |
-> Float | The Initial Velocity Multiplying Factor |
-> Float | The Initial inclination angle of weapon |
-> Float | Weapon's Impact Radius |
-> Color4 Float | Bullet Color |
-> Color4 Float | Bullet Color |
-> Vector3 Float | Initial Column Number in the tileMatrix |
-> Float | Initial Column Number in the tileMatrix |
-> Float | Initial Column Number in the tileMatrix |
-> WeaponGraphics | Initial Column Number in the tileMatrix |
The initializeWeapon function initializes the data type WeaponGraphics with the given values
updatePositionWeapon :: WeaponGraphics -> GameState -> [[Tile]] -> WeaponGraphics #
Function to take a weapon as input and return a new weapon with new position after next projectile motion
updateWeapon :: WeaponGraphics -> GameState -> [[Tile]] -> WeaponGraphics #
helper function to call updatePositionWeapon if bullet has not impacted
updateHealth :: Weapon -> Tank -> Tank #
function to quantify the damage
updateGameStateWeapon :: GameState -> GameState #
Function to update the game state for bullet motion
noOfPlayerWithNoHealth :: [Tank] -> Int #
no of player with no health
checkScore :: Tank -> Bool #
find if score is negative
nextTankChance :: [Tank] -> Int -> Int -> Int #
find next chance of player