Prechádzať zdrojové kódy

FormatInt for int64.

Steve Thielemann 3 rokov pred
rodič
commit
eb76e806d9
1 zmenil súbory, kde vykonal 7 pridanie a 1 odobranie
  1. 7 1
      playcards.go

+ 7 - 1
playcards.go

@@ -23,6 +23,7 @@ type PlayCards struct {
 	Play_day       time.Time
 	Play_day_t     int64
 	Days_played    int
+	Hand           int
 }
 
 // Adjust date to 2:00 AM
@@ -58,7 +59,7 @@ func (pc *PlayCards) Init() {
 	pc.Days_played, _ = strconv.Atoi(days)
 
 	if last_played != pc.Play_day_t {
-		pc.DB.SetSetting("last_played", strconv.Itoa(int(pc.Play_day_t)))
+		pc.DB.SetSetting("last_played", strconv.FormatInt(pc.Play_day_t, 10))
 		pc.DB.SetSetting("days_played", "0")
 		pc.Days_played = 0
 	}
@@ -72,4 +73,9 @@ func (pc *PlayCards) Init() {
 		pc.Seeds = append(pc.Seeds, int32(i))
 	}
 
+	pc.Hand = 0
+	pc.Total_hands = 0
+
+	// Panels ?
+
 }