Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Bronx = District{ Name: "Bronx", DrugsAvailable: make(Drugs, 6), ID: 3, Properties: DistrictProperties{ Hospital: true, Bank: false, LoanShark: true, NeighbourIDs: []int{0, 2}, Wealth: 1, }, }
var Crook = Enemy{"Crook", 100, Knuckle, Knife, 1.2, 1.0, 0.4, true, false} //print only that he's armed with a Knife
var Districts = []District{manhattan, brooklyn, queens, Bronx, statenIsland}
var GangLeader = Enemy{"Gang Leader", 100, machineGun, pistol, 1.7, 2.5, 0.05, true, false}
var Gangster = Enemy{"Gangster", 100, pistol, machete, 1.5, 2.0, 0.08, true, false}
var Gangster2 = Enemy{"Gangster", 100, SMG, baseballBat, 1.3, 1.9, 0.1, true, false}
TODO: weapon randomization
var Gangster3 = Enemy{"Gangster", 100, shotgun, Knuckle, 2.0, 2.1, 0.07, true, false}
var Junkie = Enemy{"Junkie", 70, Knuckle, Knife, 1.0, 1.75, 0.6, true, false} //TODO: random junkie health, changes depending on which drug the player is selling the most
var PoliceCar = Enemy{"Police Officer in a car", 100, pistol, baton, 2.5, 1.5, 0.33, false, true} //TODO: add cars for the player
var PoliceHeli = Enemy{"Police Officer in a helicopter", 100, machineGun, shotgun, 5.0, 3.0, 0.1, false, true} //TODO: fights escalation
var PolicePed = Enemy{"Police Officer on foot", 100, pistol, baton, 1.0, 1.0, 0.5, false, true} //TODO: likelihood will depend on WantedLevel. If the c has a very high reputation, it will be possible to visit the police station and bribe the police to decrease the WantedLevel and the likelihood of encounter.
Functions ¶
This section is empty.
Types ¶
type Character ¶
type Character struct { Name string Health int Reputation, WantedLevel int Cash int Days int Bank int Debt int CurrentDistrict District Weapons WeaponUnits // contains filtered or unexported fields }
func InitPlayer ¶
func InitPlayer() *Character
type District ¶
type District struct { Name string DrugsAvailable Drugs ID int Properties DistrictProperties }
func (District) PrintNeighbours ¶
func (d District) PrintNeighbours()
print a numbered list of the Districts the player can travel with their Names to according to their IDs. The length of the list will change depending on the length of the player's current District's NeighbourIDs slice. A switch case will be used, where the cases are currentDistrict.ID and the cases are the IDs of the Districts in the NeighbourIDs slice. The player will be able to travel to any of the Districts in the NeighbourIDs slice.
type DistrictProperties ¶
type FightFlight ¶
type FightFlight interface { MeleeAttack() RangedAttack() Throw() Dodge() Bribe() Submit() Run() }
type Save ¶
type Save struct { Name string Health int Reputation, WantedLevel int Cash int Days int Bank int Debt int CurrentDistrict District Drugs Drugs Weapons WeaponUnits WeaponsAvailable []Weapon }
using the following doc: https://docs.rocketnine.space/code.rocketnine.space/tslocum/messeji/ create a new text field at the bottom of the screen window will be 1152x648 text field will be 1152x200 set the font.Face to assets/VT323_Regular.17.ttf set the font size to 32 var textField = messeji.NewTextField(image.Rect(0, 448, 1152, 648), font.Face("assets/VT323_Regular.ttf"))