tome_lib/game_view.go

23 lines
953 B
Go
Raw Normal View History

2021-10-01 12:43:55 -04:00
package tome_lib
import "fmt"
type GameView struct {
2021-11-10 18:00:43 -05:00
Board *Board `json:"board"`
Player *Player `json:"player"`
DeckSize int `json:"deck_size"`
EnemyLife int `json:"enemy_life"`
EnemyDeckSize int `json:"enemy_deck_size"`
EnemyHandSize int `json:"enemy_hand_size"`
CurrentTurn int `json:"current_turn"`
CanDraw bool `json:"can_draw"`
HasDrawn bool `json:"has_drawn"`
QueuedEffect *Effect `json:"queued_effect"`
TargetReq TargetStatus `json:"target_required"`
Status GameStatus `json:"game_status"`
2021-10-01 12:43:55 -04:00
}
func (v *GameView) String() string {
return fmt.Sprintf("Enemy Life: %v Enemy Hand Size: %v Enemy DeckSize: %v\n\n%v\n\n%v\nYou Life: %v\nCT:%v CD: %v, HD %v, Status: %v\n", v.EnemyLife, v.EnemyHandSize, v.EnemyDeckSize, v.Board, v.Player.Hand, v.Player.Life, v.CurrentTurn, v.CanDraw, v.HasDrawn, v.Status)
}