// Code generated by the FlatBuffers compiler. DO NOT EDIT.

package report

import (
	flatbuffers "github.com/google/flatbuffers/go"
)

type Player struct {
	_tab flatbuffers.Table
}

func GetRootAsPlayer(buf []byte, offset flatbuffers.UOffsetT) *Player {
	n := flatbuffers.GetUOffsetT(buf[offset:])
	x := &Player{}
	x.Init(buf, n+offset)
	return x
}

func FinishPlayerBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
	builder.Finish(offset)
}

func GetSizePrefixedRootAsPlayer(buf []byte, offset flatbuffers.UOffsetT) *Player {
	n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
	x := &Player{}
	x.Init(buf, n+offset+flatbuffers.SizeUint32)
	return x
}

func FinishSizePrefixedPlayerBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
	builder.FinishSizePrefixed(offset)
}

func (rcv *Player) Init(buf []byte, i flatbuffers.UOffsetT) {
	rcv._tab.Bytes = buf
	rcv._tab.Pos = i
}

func (rcv *Player) Table() flatbuffers.Table {
	return rcv._tab
}

func (rcv *Player) Name() []byte {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
	if o != 0 {
		return rcv._tab.ByteVector(o + rcv._tab.Pos)
	}
	return nil
}

func (rcv *Player) Drive() float32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
	if o != 0 {
		return rcv._tab.GetFloat32(o + rcv._tab.Pos)
	}
	return 0.0
}

func (rcv *Player) MutateDrive(n float32) bool {
	return rcv._tab.MutateFloat32Slot(6, n)
}

func (rcv *Player) Weapons() float32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
	if o != 0 {
		return rcv._tab.GetFloat32(o + rcv._tab.Pos)
	}
	return 0.0
}

func (rcv *Player) MutateWeapons(n float32) bool {
	return rcv._tab.MutateFloat32Slot(8, n)
}

func (rcv *Player) Shields() float32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(10))
	if o != 0 {
		return rcv._tab.GetFloat32(o + rcv._tab.Pos)
	}
	return 0.0
}

func (rcv *Player) MutateShields(n float32) bool {
	return rcv._tab.MutateFloat32Slot(10, n)
}

func (rcv *Player) Cargo() float32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(12))
	if o != 0 {
		return rcv._tab.GetFloat32(o + rcv._tab.Pos)
	}
	return 0.0
}

func (rcv *Player) MutateCargo(n float32) bool {
	return rcv._tab.MutateFloat32Slot(12, n)
}

func (rcv *Player) Population() float32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(14))
	if o != 0 {
		return rcv._tab.GetFloat32(o + rcv._tab.Pos)
	}
	return 0.0
}

func (rcv *Player) MutatePopulation(n float32) bool {
	return rcv._tab.MutateFloat32Slot(14, n)
}

func (rcv *Player) Industry() float32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(16))
	if o != 0 {
		return rcv._tab.GetFloat32(o + rcv._tab.Pos)
	}
	return 0.0
}

func (rcv *Player) MutateIndustry(n float32) bool {
	return rcv._tab.MutateFloat32Slot(16, n)
}

func (rcv *Player) Planets() uint16 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(18))
	if o != 0 {
		return rcv._tab.GetUint16(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *Player) MutatePlanets(n uint16) bool {
	return rcv._tab.MutateUint16Slot(18, n)
}

func (rcv *Player) Relation() []byte {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(20))
	if o != 0 {
		return rcv._tab.ByteVector(o + rcv._tab.Pos)
	}
	return nil
}

func (rcv *Player) Votes() float32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(22))
	if o != 0 {
		return rcv._tab.GetFloat32(o + rcv._tab.Pos)
	}
	return 0.0
}

func (rcv *Player) MutateVotes(n float32) bool {
	return rcv._tab.MutateFloat32Slot(22, n)
}

func (rcv *Player) Extinct() bool {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(24))
	if o != 0 {
		return rcv._tab.GetBool(o + rcv._tab.Pos)
	}
	return false
}

func (rcv *Player) MutateExtinct(n bool) bool {
	return rcv._tab.MutateBoolSlot(24, n)
}

func PlayerStart(builder *flatbuffers.Builder) {
	builder.StartObject(11)
}
func PlayerAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(name), 0)
}
func PlayerAddDrive(builder *flatbuffers.Builder, drive float32) {
	builder.PrependFloat32Slot(1, drive, 0.0)
}
func PlayerAddWeapons(builder *flatbuffers.Builder, weapons float32) {
	builder.PrependFloat32Slot(2, weapons, 0.0)
}
func PlayerAddShields(builder *flatbuffers.Builder, shields float32) {
	builder.PrependFloat32Slot(3, shields, 0.0)
}
func PlayerAddCargo(builder *flatbuffers.Builder, cargo float32) {
	builder.PrependFloat32Slot(4, cargo, 0.0)
}
func PlayerAddPopulation(builder *flatbuffers.Builder, population float32) {
	builder.PrependFloat32Slot(5, population, 0.0)
}
func PlayerAddIndustry(builder *flatbuffers.Builder, industry float32) {
	builder.PrependFloat32Slot(6, industry, 0.0)
}
func PlayerAddPlanets(builder *flatbuffers.Builder, planets uint16) {
	builder.PrependUint16Slot(7, planets, 0)
}
func PlayerAddRelation(builder *flatbuffers.Builder, relation flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(8, flatbuffers.UOffsetT(relation), 0)
}
func PlayerAddVotes(builder *flatbuffers.Builder, votes float32) {
	builder.PrependFloat32Slot(9, votes, 0.0)
}
func PlayerAddExtinct(builder *flatbuffers.Builder, extinct bool) {
	builder.PrependBoolSlot(10, extinct, false)
}
func PlayerEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
	return builder.EndObject()
}
