37 lines
909 B
Go
37 lines
909 B
Go
package tome_game
|
|
|
|
import (
|
|
. "git.saintnet.tech/tomecraft/tome_lib"
|
|
)
|
|
|
|
func NewView(id int, g *Game) *GameView {
|
|
if id == SentinalID {
|
|
return &GameView{
|
|
Board: g.GameBoard,
|
|
Player: g.SentinalPlayer,
|
|
DeckSize: g.SentinalDeck.Size(),
|
|
EnemyLife: g.ScourgePlayer.Life,
|
|
EnemyDeckSize: g.ScourgeDeck.Size(),
|
|
EnemyHandSize: len(g.ScourgePlayer.Hand),
|
|
CurrentTurn: g.CurrentTurn,
|
|
CanDraw: g.CanDraw,
|
|
HasDrawn: g.HasDrawn,
|
|
Status: g.Status,
|
|
}
|
|
} else {
|
|
return &GameView{
|
|
Board: g.GameBoard,
|
|
Player: g.ScourgePlayer,
|
|
DeckSize: g.ScourgeDeck.Size(),
|
|
EnemyLife: g.SentinalPlayer.Life,
|
|
EnemyDeckSize: g.SentinalDeck.Size(),
|
|
EnemyHandSize: len(g.SentinalPlayer.Hand),
|
|
CurrentTurn: g.CurrentTurn,
|
|
CanDraw: g.CanDraw,
|
|
HasDrawn: g.HasDrawn,
|
|
Status: g.Status,
|
|
}
|
|
|
|
}
|
|
}
|