Commit b5b723fa authored by ceddral's avatar ceddral
Browse files

game: NewStatePlacePiece: remove unnecessary intermediate variable

parent 592b459e
......@@ -421,12 +421,12 @@ type StatePlacePiece struct {
rot Rotation
}
func NewStatePlacePiece(g *Game, a *GamePlayer) (s *StatePlacePiece) {
func NewStatePlacePiece(g *Game, a *GamePlayer) *StatePlacePiece {
if len(g.pieceOrder) == 0 {
// TODO wertung
panic("we did it")
}
s = &StatePlacePiece{
return &StatePlacePiece{
agent: a,
g: g,
p: g.drawPiece(),
......@@ -434,7 +434,6 @@ func NewStatePlacePiece(g *Game, a *GamePlayer) (s *StatePlacePiece) {
boardy: 0,
rot: 0,
}
return
}
func (s *StatePlacePiece) getAgent() *GamePlayer { return s.agent }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment