Documentation ¶
Index ¶
- Constants
- Variables
- func DrawPieceToScreen(ImageObj *Utilities.ImageObj, screen *ebiten.Image, pnt *Utilities.Point, ...)
- func EXITGAME()
- func GetBestOfStatistic(g *InGame, category string) []int
- func GetItemPos(ID int) (pnt *Utilities.Point)
- func GetLineOfPoints(pnt1, pnt2 *Utilities.Point) []*Utilities.Point
- func GetPlayerStats(g *InGame, category string) []float64
- func GetPlayerTiles(ID int) [][]*Utilities.ImageObj
- func GetPolynomOfPoints(pnts ...*Utilities.Point) []*Utilities.Point
- func GetSnakeTilesFromPlayerSnakeBodies(ID int) ([]*Utilities.ImageObj, []*Utilities.ImageObj, []*Utilities.ImageObj, ...)
- func HOFClick(b *Utilities.Button)
- func InitAppleImgs()
- func InitSounds()
- func LoadStatistics(path string, obj *Statistics) error
- func MinuxXSqurdPOne(x float64) float64
- func OnControllerClick(b *Utilities.Button)
- func OnExitClick(b *Utilities.Button)
- func OnPlayNameLClick(b *Utilities.Button)
- func OnPlayNameRClick(b *Utilities.Button)
- func OnPokalClick(b *Utilities.Button)
- func PlayClick(b *Utilities.Button)
- func SaveStruct(path string, obj interface{})
- func Start()
- func StartGame(game ebiten.Game, name string, icons []image.Image)
- type Apple
- type AppleTimer
- type Bomb
- func (s *Bomb) Draw(screen *ebiten.Image, mapper *map[Utilities.Point]Utilities.Point)
- func (s *Bomb) DrawCorner(screen *ebiten.Image, pnt *Utilities.Point)
- func (s *Bomb) OnCollision(ownTile, collTile Ptype, collPcs interface{})
- func (s *Bomb) Pos() *Utilities.Point
- func (s *Bomb) Use(p *Player, g *InGame)
- type BombFactory
- type BombObj
- type Bot
- func (s *Bot) Draw(screen *ebiten.Image, mapper *map[Utilities.Point]Utilities.Point)
- func (s *Bot) DrawCorner(screen *ebiten.Image, pnt *Utilities.Point)
- func (s *Bot) OnCollision(ownTile, collTile Ptype, collPcs interface{})
- func (s *Bot) Pos() *Utilities.Point
- func (s *Bot) Use(p *Player, g *InGame)
- type BotFactory
- type BotSnake
- func (o *BotSnake) Draw(screen *ebiten.Image, mapper *map[Utilities.Point]Utilities.Point)
- func (o *BotSnake) Exists() bool
- func (o *BotSnake) GetClosestPlayer(g *InGame) *Player
- func (o *BotSnake) GetNextDir(g *InGame) *Direction
- func (o *BotSnake) Init(p *Player, g *InGame)
- func (o *BotSnake) Update(g *InGame)
- type COLLISION
- type Direction
- func (d *Direction) Copy() *Direction
- func (d *Direction) Equals(d2 *Direction) bool
- func (d *Direction) GetRotation() float64
- func (d *Direction) GetXYDif() (float64, float64)
- func (d *Direction) Inverse() *Direction
- func (d *Direction) IsInvers(d2 *Direction) bool
- func (d *Direction) IsLeft(d2 *Direction) bool
- func (d *Direction) IsRight(d2 *Direction) bool
- func (d *Direction) Left() *Direction
- func (d *Direction) Right() *Direction
- type Fart
- func (s *Fart) Draw(screen *ebiten.Image, mapper *map[Utilities.Point]Utilities.Point)
- func (s *Fart) DrawCorner(screen *ebiten.Image, pnt *Utilities.Point)
- func (s *Fart) OnCollision(ownTile, collTile Ptype, collPcs interface{})
- func (s *Fart) Pos() *Utilities.Point
- func (s *Fart) Use(p *Player, g *InGame)
- type FartFactory
- type FartObj
- type GameState
- type HallOfFame
- type ITEMNAME
- func (s *ITEMNAME) Draw(screen *ebiten.Image, mapper *map[Utilities.Point]Utilities.Point)
- func (s *ITEMNAME) DrawCorner(screen *ebiten.Image, pnt *Utilities.Point)
- func (s *ITEMNAME) OnCollision(ownTile, collTile Ptype, collPcs interface{})
- func (s *ITEMNAME) Pos() *Utilities.Point
- func (s *ITEMNAME) Use(p *Player, g *InGame)
- type ITEMNAMEFactory
- type InGame
- type Item
- type ItemFactory
- type Laser
- func (s *Laser) Draw(screen *ebiten.Image, mapper *map[Utilities.Point]Utilities.Point)
- func (s *Laser) DrawCorner(screen *ebiten.Image, pnt *Utilities.Point)
- func (s *Laser) OnCollision(ownTile, collTile Ptype, collPcs interface{})
- func (s *Laser) Pos() *Utilities.Point
- func (s *Laser) Use(p *Player, g *InGame)
- type LaserFactory
- type LaserObj
- type LastPlayerNames
- type Menu
- type Piece
- type Player
- func (p *Player) Draw(screen *ebiten.Image, PntToScrn *map[Utilities.Point]Utilities.Point)
- func (p *Player) EatFood(NutritionValue int)
- func (p *Player) GetAllPieces() ([]Piece, []*Utilities.Point)
- func (p *Player) GetAllPoints() []*Utilities.Point
- func (p *Player) GetCurrDir() *Direction
- func (p *Player) GetHead() *Utilities.Point
- func (p *Player) GetNextDir() *Direction
- func (p *Player) GetScore() int
- func (p *Player) GetSpeed() float64
- func (p *Player) GetState() PlayerState
- func (p *Player) GetTail() *Utilities.Point
- func (p *Player) GetTiles() *Utilities.SnakeTiles
- func (p *Player) Init(g *InGame, ID int, speed float64)
- func (p *Player) OnCollision(coll COLLISION, kill, dead int)
- func (p *Player) Reset(ID, conID int, speed float64, state PlayerState)
- func (p *Player) SetCurrDir(dir *Direction)
- func (p *Player) SetDead(frame int)
- func (p *Player) SetNextDir(dir *Direction)
- func (p *Player) SetScore(score int)
- func (p *Player) SetSpeed(speed float64)
- func (p *Player) SetState(state PlayerState)
- func (p *Player) SetUndestroyable(t int)
- func (p *Player) Update(frame int)
- type PlayerButtonEventListener
- type PlayerDirectionEventListener
- type PlayerScoreAndID
- type PlayerState
- type PlayerStats
- type Point
- type Ptype
- type Revive
- func (s *Revive) Draw(screen *ebiten.Image, mapper *map[Utilities.Point]Utilities.Point)
- func (s *Revive) DrawCorner(screen *ebiten.Image, pnt *Utilities.Point)
- func (s *Revive) OnCollision(ownTile, collTile Ptype, collPcs interface{})
- func (s *Revive) Pos() *Utilities.Point
- func (s *Revive) Use(p *Player, g *InGame)
- type ReviveFactory
- type ReviveObj
- type RuntimeStats
- type Snake
- func (s *Snake) Draw(screen *ebiten.Image, PntToScrn *map[Utilities.Point]Utilities.Point)
- func (s *Snake) EatFood(NutritionValue int)
- func (s *Snake) GetAllPieces() ([]Piece, []*Utilities.Point)
- func (s *Snake) GetAllPoints() []*Utilities.Point
- func (s *Snake) GetHead() *Utilities.Point
- func (s *Snake) Reset(speed float64, state, X, Y, lenght int, dir *Direction)
- func (s *Snake) Update(frame int)
- func (s *Snake) UpdateCurrDir()
- func (s *Snake) UpdateSnakeHead()
- func (s *Snake) UpdateSnakeTail()
- type SnakePiece
- type SnakePro
- func (g *SnakePro) DrawToScreen(screen *ebiten.Image)
- func (g *SnakePro) DrawToasts(screen *ebiten.Image)
- func (g *SnakePro) Init()
- func (g *SnakePro) InitBeginning(screen *ebiten.Image)
- func (g *SnakePro) Layout(outsideWidth, outsideHeight int) (int, int)
- func (g *SnakePro) MakeToast(str string)
- func (g *SnakePro) RemoveToasts()
- func (g *SnakePro) SaveCons(ids []int)
- func (g *SnakePro) Update(screen *ebiten.Image) error
- func (g *SnakePro) UpdateToasts()
- type SoundEffect
- type Speed
- func (s *Speed) Draw(screen *ebiten.Image, mapper *map[Utilities.Point]Utilities.Point)
- func (s *Speed) DrawCorner(screen *ebiten.Image, pnt *Utilities.Point)
- func (s *Speed) OnCollision(ownTile, collTile Ptype, collPcs interface{})
- func (s *Speed) Pos() *Utilities.Point
- func (s *Speed) Use(p *Player, g *InGame)
- type SpeedFactory
- type SpeedObj
- type StaticObj
- type Statistics
- func (r *Statistics) AddHead(head string, val int)
- func (r *Statistics) Append()
- func (r *Statistics) GetHead(head string) int
- func (r *Statistics) Init(strs []string)
- func (r *Statistics) Print() string
- func (r *Statistics) ResetHeader()
- func (r *Statistics) Set()
- func (r *Statistics) SetHead(head string, val int)
- func (r *Statistics) WriteToCSV(path string)
- type Teststruct
- type Teststruct2
- type Toast
- type World
- func (w *World) CheckAL_PL__AL_PL(pl *Player, i int)
- func (w *World) CheckAL_PL__ANY_ITM(pl *Player)
- func (w *World) CheckAL_PL__N_APL(pl *Player)
- func (w *World) CheckAL_PL__SELF(pl *Player)
- func (w *World) CheckAL_PL__WALL(pl *Player)
- func (w *World) CheckCollision()
- func (w *World) CheckCollisionPlayer(pl *Player)
- func (w *World) CheckGH_PL__ANY_ITM(pl *Player)
- func (w *World) CheckGH_PL__N_APL(pl *Player)
- func (w *World) CheckGH_PL__WALL(pl *Player)
- func (w *World) Draw(screen *ebiten.Image)
- func (w *World) InitBeginning()
- func (w *World) RemoveApple(i int)
- func (w *World) RemoveAppleObj(a *Apple)
- func (w *World) RemoveItem(i int)
- func (w *World) RemoveObjs(is []int)
- func (w *World) SpawnApple()
- func (w *World) SpawnItem()
- func (w *World) Start(pls []*Player)
- func (w *World) Update(frame int)
Constants ¶
View Source
const ( SubImageScale = 2 FPS = 30 )
View Source
const ( P_SnkH = Ptype(0) P_SnkB = Ptype(1) P_SnkT = Ptype(2) P_Apl = Ptype(3) P_Itm = Ptype(4) P_Wall = Ptype(5) )
View Source
const ( ALIVE = PlayerState(0) GHOST = PlayerState(1) WAITING = PlayerState(2) )
View Source
const MaxScoreTiles = 18
Variables ¶
View Source
var ( SnakeProGame *SnakePro SnakeProInGame *InGame //Loaded Parameter Map Ps, IMGPOSITIONS *Utilities.Params //Screen attributes XRes, YRes float64 XTiles, YTiles float64 MapToScreen *map[Utilities.Point]Utilities.Point //Loading Screen Intro Loading_Intro *Utilities.ImageObj //Player attributes PlayerNum, PlayerStartLenght int TileWidth, TileHeight float64 PlayerSpeed, ControllerThresh float64 ControllerIds []int SnakeColors = []color.RGBA{{0, 0, 255, 255}, {255, 0, 60, 255}, {255, 255, 0, 255}, {239, 49, 165, 255}} //World attributes BeginItems, BeginApples, ItemSpawnPeriod, AppleNutrition uint PlayerAliveAloneFrames int RottenAppleTime float64 //Stats RuntimeStatistics *RuntimeStats //Menu Exit_X, Exit_Y, Play_X, Play_Y, Con_X, Con_Y, HOF_X, HOF_Y float64 PLN_XPOS, PLN_YPOS, PLN_WIDTH, PLN_HEIGHT float64 Win_Head_Pos_X, Win_Head_Rot, Win_Head_S float64 //Sounds SoundEffects map[string]*SoundEffect //Items LaserLength, BotLength int ReviveImmortalTime, LaserTime, BombTime, BotSpeed, SpeedLength, SpeedStrength, FartTime, FartStrength float64 BombLength, BombRadius, FartRadius int )
View Source
var ( AL_PL__N_APL = COLLISION(1) AL_PL__SELF = COLLISION(2) AL_PL__AL_PL = COLLISION(3) AL_PL__WALL = COLLISION(4) AL_PL__ANY_ITM = COLLISION(5) GH_PL__N_APL = COLLISION(7) GH_PL__ANY_ITM = COLLISION(8) GH_PL__WALL = COLLISION(9) //true if victim VICTORY = COLLISION(10) SKILL = COLLISION(11) LASER = COLLISION(12) BOMB = COLLISION(13) BOT = COLLISION(14) FART = COLLISION(15) )
View Source
var ( ControllSettings = []string{"Left", "Right", "Up", "Down", "Item"} SettingControll int ChangingConID int SettingNameID int NEWNAMEFORID string PLAYPLAYPLAY bool )
View Source
var ( //HeadScale float64 //HeadPos []*Point PokalScale float64 PokalPos []*Point )
View Source
var (
AppleImg, AppleImg_Rotten *Utilities.ImageObj
)
View Source
var (
Bomb_Item_Image, Bomb_Item_Rotten_Image, Bomb_Item_Image_Corner, Bomb_Obj_Image_Radius, Bomb_Obj_Image *Utilities.ImageObj
)
View Source
var (
Bot_Item_Image, Bot_Item_Rotten_Image, Bot_Item_Image_Corner, Bot_Obj_Image_H, Bot_Obj_Image_B *Utilities.ImageObj
)
View Source
var CornerPoints []*Utilities.Point
View Source
var (
Fart_Item_Image, Fart_Item_Rotten_Image, Fart_Obj_Image, Fart_Obj_Rotten_Image, Fart_Item_Image_Corner *Utilities.ImageObj
)
View Source
var (
ITEMNAME_Item_Image, ITEMNAME_Item_Image_Corner *Utilities.ImageObj
)
View Source
var KeyBackspaceState bool
View Source
var (
Laser_Item_Image, Laser_Item_Rotten_Image, Laser_Item_Image_Corner, Laser_Obj_Image, Laser_Smoke_Obj_Image *Utilities.ImageObj
)
View Source
var LoadingPoints []*Utilities.Point
View Source
var LoadingSnakes []*Snake
View Source
var (
PlayerSnakeBodies [][][]*Utilities.ImageObj
)
View Source
var (
Revive_Item_Image, Revive_Item_Image_Corner *Utilities.ImageObj
)
View Source
var (
Speed_Item_Image, Speed_Item_Image_Corner, Speed_Item_Rotten_Image *Utilities.ImageObj
)
View Source
var UpButtonsTime, UpListenerTime []int
Functions ¶
func DrawPieceToScreen ¶
func GetBestOfStatistic ¶
func GetItemPos ¶
func GetPlayerStats ¶
func GetPlayerTiles ¶
func InitAppleImgs ¶
func InitAppleImgs()
func InitSounds ¶
func InitSounds()
func LoadStatistics ¶
func LoadStatistics(path string, obj *Statistics) error
func MinuxXSqurdPOne ¶
func OnControllerClick ¶
func OnExitClick ¶
func OnPlayNameLClick ¶
func OnPlayNameRClick ¶
func OnPokalClick ¶
func SaveStruct ¶
func SaveStruct(path string, obj interface{})
Types ¶
type AppleTimer ¶
func (*AppleTimer) Exists ¶
func (o *AppleTimer) Exists() bool
func (*AppleTimer) Update ¶
func (o *AppleTimer) Update(g *InGame)
type BombFactory ¶
type BombFactory struct {
// contains filtered or unexported fields
}
func (*BombFactory) GetProbability ¶
func (f *BombFactory) GetProbability() float64
func (*BombFactory) GetRandomItemInBounds ¶
func (f *BombFactory) GetRandomItemInBounds(W, H int) Item
func (*BombFactory) Init ¶
func (f *BombFactory) Init()
type BombObj ¶
type BombObj struct { Owner *Player Timer int Position *Utilities.Point // contains filtered or unexported fields }
type BotFactory ¶
type BotFactory struct {
// contains filtered or unexported fields
}
func (*BotFactory) GetProbability ¶
func (f *BotFactory) GetProbability() float64
func (*BotFactory) GetRandomItemInBounds ¶
func (f *BotFactory) GetRandomItemInBounds(W, H int) Item
func (*BotFactory) Init ¶
func (f *BotFactory) Init()
type BotSnake ¶
func (*BotSnake) GetClosestPlayer ¶
func (*BotSnake) GetNextDir ¶
type Direction ¶
type Direction struct {
Type int
}
func DetDirFrom2Ts ¶
func GetDirFromXYDif ¶
func GetRandomDir ¶
func GetRandomDir() *Direction
func (*Direction) GetRotation ¶
type FartFactory ¶
type FartFactory struct {
// contains filtered or unexported fields
}
func (*FartFactory) GetProbability ¶
func (f *FartFactory) GetProbability() float64
func (*FartFactory) GetRandomItemInBounds ¶
func (f *FartFactory) GetRandomItemInBounds(W, H int) Item
func (*FartFactory) Init ¶
func (f *FartFactory) Init()
type FartObj ¶
type FartObj struct { Owner *Player Timer int Position *Utilities.Point IsRotten bool // contains filtered or unexported fields }
type HallOfFame ¶
type HallOfFame struct { Back *Utilities.ImageObj PokalBtns []*Utilities.Button PokalSnakes [][]*Snake // contains filtered or unexported fields }
func (*HallOfFame) Draw ¶
func (h *HallOfFame) Draw(screen *ebiten.Image)
func (*HallOfFame) Init ¶
func (h *HallOfFame) Init(g *SnakePro)
*
func DisplayHeadAtPokal(idx int, Head *Utilities.ImageObj, screen *ebiten.Image) { Head.X, Head.Y = HeadPos[idx].X, HeadPos[idx].Y Head.W, Head.H = HeadScale,HeadScale Head.Angle = 0 Head.DrawImageObj(screen) }
*
func (*HallOfFame) Start ¶
func (h *HallOfFame) Start()
type ITEMNAME ¶
func (*ITEMNAME) DrawCorner ¶
func (*ITEMNAME) OnCollision ¶
type ITEMNAMEFactory ¶
type ITEMNAMEFactory struct {
// contains filtered or unexported fields
}
func (*ITEMNAMEFactory) GetProbability ¶
func (f *ITEMNAMEFactory) GetProbability() float64
func (*ITEMNAMEFactory) GetRandomItemInBounds ¶
func (f *ITEMNAMEFactory) GetRandomItemInBounds(W, H int) Item
func (*ITEMNAMEFactory) Init ¶
func (f *ITEMNAMEFactory) Init()
type InGame ¶
type InGame struct { World *World Pls []*Player ReturnTime int // contains filtered or unexported fields }
func (*InGame) CheckIfAllDead ¶
func (g *InGame) CheckIfAllDead()
type ItemFactory ¶
type LaserFactory ¶
type LaserFactory struct {
// contains filtered or unexported fields
}
func (*LaserFactory) GetProbability ¶
func (f *LaserFactory) GetProbability() float64
func (*LaserFactory) GetRandomItemInBounds ¶
func (f *LaserFactory) GetRandomItemInBounds(W, H int) Item
func (*LaserFactory) Init ¶
func (f *LaserFactory) Init()
type LaserObj ¶
type LaserObj struct { Owner *Player Points *Utilities.SnakeTiles Timer, FullTime int Rotation *Direction // contains filtered or unexported fields }
type LastPlayerNames ¶
type LastPlayerNames struct {
L1, L2, L3, L4 string
}
func LoadLastPlayerNames ¶
func LoadLastPlayerNames(path string) (*LastPlayerNames, error)
func (*LastPlayerNames) Get ¶
func (l *LastPlayerNames) Get(i int) string
func (*LastPlayerNames) Save ¶
func (l *LastPlayerNames) Save(path string)
func (*LastPlayerNames) Set ¶
func (l *LastPlayerNames) Set(i int, name string)
type Menu ¶
type Menu struct {
Buttons, NameBtns []*Utilities.Button
BackGroundImg *Utilities.ImageObj
PlayerScores []*Snake
ChangingCons []int
// contains filtered or unexported fields
}
func (*Menu) SetController ¶
func (g *Menu) SetController()
func (*Menu) UpdateDrawedPlayerName ¶
type Player ¶
type Player struct {
ID, ConID int
CurrentItem Item
ItemPos *Utilities.Point
Statistic *PlayerStats
// contains filtered or unexported fields
}
func (*Player) GetAllPoints ¶
func (*Player) GetCurrDir ¶
func (*Player) GetNextDir ¶
func (*Player) GetState ¶
func (p *Player) GetState() PlayerState
func (*Player) GetTiles ¶
func (p *Player) GetTiles() *Utilities.SnakeTiles
func (*Player) OnCollision ¶
func (*Player) SetCurrDir ¶
func (*Player) SetNextDir ¶
func (*Player) SetState ¶
func (p *Player) SetState(state PlayerState)
func (*Player) SetUndestroyable ¶
type PlayerButtonEventListener ¶
type PlayerButtonEventListener struct {
// contains filtered or unexported fields
}
func (*PlayerButtonEventListener) GetButton ¶
func (l *PlayerButtonEventListener) GetButton() int
func (*PlayerButtonEventListener) OnButtonDown ¶
func (l *PlayerButtonEventListener) OnButtonDown()
func (*PlayerButtonEventListener) OnButtonUp ¶
func (l *PlayerButtonEventListener) OnButtonUp()
type PlayerDirectionEventListener ¶
type PlayerDirectionEventListener struct {
// contains filtered or unexported fields
}
func (*PlayerDirectionEventListener) GetAxis ¶
func (l *PlayerDirectionEventListener) GetAxis() (int, int, int, int)
func (*PlayerDirectionEventListener) OnDirectionEvent ¶
func (l *PlayerDirectionEventListener) OnDirectionEvent(xdif, ydif float64)
type PlayerScoreAndID ¶
type PlayerScoreAndID struct { ID int // contains filtered or unexported fields }
func GetStatisticsList ¶
func GetStatisticsList(g *InGame, category string) []PlayerScoreAndID
type PlayerState ¶
type PlayerState int
type PlayerStats ¶
type PlayerStats struct { Statistics // contains filtered or unexported fields }
func GetNewPlayerStatistic ¶
func GetNewPlayerStatistic(name string, strs []string) (s *PlayerStats)
func (*PlayerStats) Load ¶
func (s *PlayerStats) Load() error
func (*PlayerStats) Name ¶
func (s *PlayerStats) Name() string
func (*PlayerStats) Save ¶
func (s *PlayerStats) Save()
func (*PlayerStats) SetName ¶
func (s *PlayerStats) SetName(name string)
type ReviveFactory ¶
type ReviveFactory struct {
// contains filtered or unexported fields
}
func (*ReviveFactory) GetProbability ¶
func (f *ReviveFactory) GetProbability() float64
func (*ReviveFactory) GetRandomItemInBounds ¶
func (f *ReviveFactory) GetRandomItemInBounds(W, H int) Item
func (*ReviveFactory) Init ¶
func (f *ReviveFactory) Init()
type ReviveObj ¶
type ReviveObj struct { Position *Utilities.Point RemainingTime, FullTime int // contains filtered or unexported fields }
type RuntimeStats ¶
type RuntimeStats struct {
Statistics
}
type Snake ¶
type Snake struct { Score int SnkH, SnkB, SnkT, SnkR, SnkL []*Utilities.ImageObj // contains filtered or unexported fields }
func CreateSnake ¶
func GetSnakeOfType ¶
func GetWinnerSnakes ¶
func (*Snake) GetAllPoints ¶
func (*Snake) UpdateCurrDir ¶
func (s *Snake) UpdateCurrDir()
func (*Snake) UpdateSnakeHead ¶
func (s *Snake) UpdateSnakeHead()
func (*Snake) UpdateSnakeTail ¶
func (s *Snake) UpdateSnakeTail()
type SnakePiece ¶
type SnakePiece struct { Type Ptype // contains filtered or unexported fields }
func (*SnakePiece) GetImg ¶
func (s *SnakePiece) GetImg() *Utilities.ImageObj
func (*SnakePiece) Ptype ¶
func (s *SnakePiece) Ptype() Ptype
type SnakePro ¶
type SnakePro struct { CurrentState int States []GameState Cons *[]*Utilities.Controller Toasts []*Toast XRes, YRes float64 XTiles, YTiles float64 XTileWidth, YTileWidth float64 // contains filtered or unexported fields }
func (*SnakePro) DrawToScreen ¶
func (*SnakePro) DrawToasts ¶
func (*SnakePro) InitBeginning ¶
func (*SnakePro) RemoveToasts ¶
func (g *SnakePro) RemoveToasts()
func (*SnakePro) UpdateToasts ¶
func (g *SnakePro) UpdateToasts()
type SoundEffect ¶
type SoundEffect struct {
// contains filtered or unexported fields
}
func LoadSoundEffect ¶
func LoadSoundEffect(folder string) (s *SoundEffect)
func (*SoundEffect) PR ¶
func (s *SoundEffect) PR()
type SpeedFactory ¶
type SpeedFactory struct {
// contains filtered or unexported fields
}
func (*SpeedFactory) GetProbability ¶
func (f *SpeedFactory) GetProbability() float64
func (*SpeedFactory) GetRandomItemInBounds ¶
func (f *SpeedFactory) GetRandomItemInBounds(W, H int) Item
func (*SpeedFactory) Init ¶
func (f *SpeedFactory) Init()
type SpeedObj ¶
type SpeedObj struct { Owner *Player Timer int IsRotten bool RottenDec int // contains filtered or unexported fields }
type Statistics ¶
func (*Statistics) AddHead ¶
func (r *Statistics) AddHead(head string, val int)
func (*Statistics) Append ¶
func (r *Statistics) Append()
func (*Statistics) GetHead ¶
func (r *Statistics) GetHead(head string) int
func (*Statistics) Init ¶
func (r *Statistics) Init(strs []string)
func (*Statistics) Print ¶
func (r *Statistics) Print() string
func (*Statistics) ResetHeader ¶
func (r *Statistics) ResetHeader()
func (*Statistics) Set ¶
func (r *Statistics) Set()
func (*Statistics) SetHead ¶
func (r *Statistics) SetHead(head string, val int)
func (*Statistics) WriteToCSV ¶
func (r *Statistics) WriteToCSV(path string)
type Teststruct ¶
type Teststruct2 ¶
type Teststruct2 struct { Teststruct Fettheit [][]string }
type Toast ¶
type Toast struct { RemainingTime int // contains filtered or unexported fields }
func GetStandardToastShort ¶
type World ¶
type World struct { ItemFactories []ItemFactory Itms []Item SObjs []StaticObj Pls []*Player Apls []*Apple // contains filtered or unexported fields }
func (*World) CheckAL_PL__AL_PL ¶
func (*World) CheckAL_PL__ANY_ITM ¶
func (*World) CheckAL_PL__N_APL ¶
func (*World) CheckAL_PL__SELF ¶
func (*World) CheckAL_PL__WALL ¶
func (*World) CheckCollision ¶
func (w *World) CheckCollision()
func (*World) CheckCollisionPlayer ¶
func (*World) CheckGH_PL__ANY_ITM ¶
func (*World) CheckGH_PL__N_APL ¶
func (*World) CheckGH_PL__WALL ¶
func (*World) InitBeginning ¶
func (w *World) InitBeginning()
func (*World) RemoveApple ¶
func (*World) RemoveAppleObj ¶
func (*World) RemoveItem ¶
func (*World) RemoveObjs ¶
func (*World) SpawnApple ¶
func (w *World) SpawnApple()
Source Files ¶
- a__Paths.go
- a_game.go
- a_start.go
- b_Apple.go
- b_Direction.go
- b_InGame.go
- b_Interfaces.go
- b_Snake.go
- b_collisions.go
- b_player.go
- b_world.go
- c_menu.go
- c_toast.go
- d_halloffame.go
- i__example_item.go
- i_bomb.go
- i_bot.go
- i_fart.go
- i_laser.go
- i_revive.go
- i_speed.go
- s_playerstats.go
- s_statistics.go
- soundeffect.go
Click to show internal directories.
Click to hide internal directories.