Browse Source

Set turn count to 500 (original yt experience)

  Also completed more information gathering on players and planets.
Apollo 2 years ago
parent
commit
43e0ac652e
2 changed files with 39 additions and 14 deletions
  1. 2 2
      yt/yt.go
  2. 37 12
      yt/ytdata.go

+ 2 - 2
yt/yt.go

@@ -84,8 +84,8 @@ func main() {
 	d.WaitKey(2, 0)
 
 	YTSectors, err = BigBang(YTConfig{
-		Sectors:    100,
-		Turns:      1000,
+		Sectors:    3000,
+		Turns:      500,
 		Holds:      10,
 		PortReset:  1,
 		DaysExpire: 30,

+ 37 - 12
yt/ytdata.go

@@ -6,9 +6,9 @@ type YTConfig struct {
 	Sectors    int `json:"sectors"`
 	Turns      int `json:"turns"`
 	Holds      int `json:"holds"`
-	PortReset  int `json:"reset"`
+	PortReset  int `json:"reset"` // What is this? (Amount ports replenish per day?, )
 	DaysExpire int `json:"expire"`
-	Lottery    int `json:"lotto"`
+	Lottery    int `json:"lotto"` // What is this? (Number of times players can play?, Lotto seed?)
 }
 
 type YTSectorType uint16
@@ -20,7 +20,7 @@ type YTSector struct {
 	Fighters     uint           `json:"fighters"`
 	FighterOwner int            `json:"owner"`
 	Mines        uint           `json:"mines"`
-	Sectors      []YTSectorType `json:"sectors"`
+	Sectors      []YTSectorType `json:"sectors"` // Warps
 	Players      []int          `json:"players`
 }
 
@@ -39,13 +39,23 @@ func (sector YTSector) HasPort() bool {
 var YTSectors []YTSector
 
 type YTPlayer struct {
-	Sector     YTSectorType
-	Name       string    `json:"name"`
-	LastPlayed time.Time `json:"last"`
-	Turns      int       `json:"turns"`
-	Holds      int       `json:"holds"`
-	Lotto      int       `json:"lotto`
-	Cloak      uint16    `json:"cloak` // Cloak Energy
+	Sector      YTSectorType
+	Name        string    `json:"name"`
+	LastPlayed  time.Time `json:"last"`
+	Turns       int       `json:"turns"`
+	Credits     uint      `json:"credits"` // Money!
+	Holds       int       `json:"holds"`
+	Amounts     [3]uint   `json:"holding"` // FUEL, ORG, EQU
+	Lotto       uint8     `json:"lotto`    // Number of lottos able to be played
+	Cloak       uint16    `json:"cloak`    // Cloak Energy (Percent)
+	Fighters    uint      `json:"figs"`
+	Mines       uint      `json:"mines"`
+	Missiles    uint      `json:"missiles"`
+	Scanner     bool      `json:"scanner"` // Danger Scanner
+	Shields     uint      `json:"shields"`
+	Forces      uint      `json:"forces"` // Ground Forces
+	PortsOwned  uint      `json:"ports"`  // Number of ports owned by this player
+	PlasmaBolts uint      `json:"bolts"`
 }
 
 // or to database?  DB would also handle concurrency...
@@ -75,9 +85,24 @@ type YTPort struct {
 
 var YTPortMap map[YTSectorType]YTPort
 
+// Spending $$$ increases production of planets (Need to gather information)
+//
+// Putting money in the planet's bank produces interest (free money earned per day, need to get the formula)
+//
+// Forces grow as there are more stationed on the planet, also affects attack and defenses of the planet (Need to gather information on attacks and how much they grow by)
+//
+// When a planet exceeds a particular amount it encounters a recession loosing production and some items along the way (need information)
 type YTPlanet struct {
-	Name  string `json:"name"`
-	Owner int    `json:"owner"`
+	Name        string  `json:"name"`
+	Owner       int     `json:"owner"`
+	Production  [3]uint `json:"products"` // FUEL, ORG, EQU (Production per day)
+	Amounts     [3]uint `json:"amounts"`  // FUEL, ORG, EQU (Amount)
+	Fighters    [2]uint `json:"figs"`     // Production, Amount
+	Missiles    [2]uint `json:"missiles"`
+	Mines       [2]uint `json:"mines"`
+	Credits     [2]uint `json:"credits"` // Money! (Interest, Amount)
+	Forces      [2]uint `json:"forces"`  // Ground Forces (Population Growth, Population)
+	PlasmaBolts [2]uint `json:"bolts"`
 }
 
 var YTPlanets map[YTSectorType]YTPlanet