-
-
Save HolyMonkey/9290ed63c38fc732ed8f58693077095d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Weapon | |
{ | |
public int Damage; | |
public int Bullets; | |
public void Fire(Player player) | |
{ | |
player.Health -= Damage; | |
Bullets -= 1; | |
} | |
} | |
class Player | |
{ | |
public int Health; | |
} | |
class Bot | |
{ | |
public Weapon Weapon; | |
public void OnSeePlayer(Player player) | |
{ | |
Weapon.Fire(player); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment