prediction

package
v0.9.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2023 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const PAYLOAD_FORMAT = uint64(1728000)

block height of last payload format change

Variables

View Source
var PS_Control psOwnerObjects
View Source
var Predict predictObjects
View Source
var PrintColor printColors
View Source
var Service service
View Source
var Sports sportsItems

Functions

func CheckPredictionStatus added in v0.9.3

func CheckPredictionStatus()

Check dPrediction SCID for live status

func ConfirmAction added in v0.9.5

func ConfirmAction(i int, teamA, teamB string, obj []fyne.CanvasObject, tabs *container.AppTabs) fyne.CanvasObject

dSports and dPrediction action confirmation

  • i defines the action to be confirmed
  • teamA, teamB needed only for dSports confirmations
  • Pass main window obj and tabs to reset to

func DisablePreditions added in v0.9.5

func DisablePreditions(d bool)

Disable dPrediction objects

func DisableSports added in v0.9.5

func DisableSports(d bool)

Disable dSports objects

func DreamService added in v0.9.5

func DreamService(start uint64, payouts, transfers bool)

Main dReamService routine

  • start defines service starting height
  • payouts, transfers for service params

func GetActiveGames

func GetActiveGames(dc bool)

Check dSports SCID for active games

func GetBaseball added in v0.9.5

func GetBaseball(date, league string)

Gets baseball games for selected league and adds to options selection

  • date GetCurrentWeek()

func GetBasketball

func GetBasketball(date, league string)

Gets basketabll games for selected league and adds to options selection

  • date GetCurrentWeek()

func GetBook added in v0.9.1

func GetBook(scid string) (info string)

Gets dSports data from SCID and return formatted info string

func GetCurrentMonth added in v0.9.2

func GetCurrentMonth(league string)

Gets the games of league for following month

func GetCurrentWeek

func GetCurrentWeek(league string)

Gets the games of league for following week

func GetFootball

func GetFootball(date, league string)

Gets football games for selected league and adds to options selection

  • date GetCurrentWeek()

func GetGameEnd

func GetGameEnd(date, game, league string)

Find and display the end time of selected game

func GetHockey

func GetHockey(date, league string)

Gets hockey games for selected league and date

func GetMma added in v0.9.2

func GetMma(date, league string)

Gets mma matches for selected league and adds to options selection

  • date GetCurrentMonth()

func GetMmaResults added in v0.9.2

func GetMmaResults(label *widget.Label, league string)

Get final result of mma league and display info

  • Pass label for display info

func GetMmaWinner added in v0.9.2

func GetMmaWinner(game, league string) (win string, fighter string)

Gets and returns the winner of mma match

  • league defines api prefix

func GetPrediction added in v0.9.1

func GetPrediction(scid string) (info string)

Gets dPrecition data from SCID and return formatted info string

func GetScores

func GetScores(label *widget.Label, league string)

Gets past game scores for league and display info

  • Pass label for display info

func GetSoccer

func GetSoccer(date, league string)

Gets hockey games for selected league and adds to options selection

  • date GetCurrentWeek()

func GetWinner

func GetWinner(game, league string) (win string, team_name string, a_score string, b_score string)

Gets and returns the winner of game

  • league defines api prefix

func OwnerButtonP added in v0.9.5

func OwnerButtonP() fyne.CanvasObject

Owner menu open button for prediction tab

func OwnerButtonS added in v0.9.5

func OwnerButtonS() fyne.CanvasObject

Owner menu open button for sports tab

func P_initResults added in v0.9.1

func P_initResults(p, amt, eA, c, to, u, d, r, f, m string, ta, tb, tc int) (info string)

Formats intialized dPrediction info string

  • p defines prediction
  • amt is Dero value
  • eA is prediction end time
  • c is number of current predictions
  • to is current total prediction Dero pot value
  • u is higher predictions
  • d is lower predictions
  • r is total completed prediction rounds
  • f is prediction feed
  • m is prediction mark
  • ta, tb, tc are current contrct time frames

func P_no_initResults added in v0.9.1

func P_no_initResults(fr, tx, r, m string) (info string)

Formats non-intialized dPrediction info string

  • fr is the unsplit result string
  • tx is the previous payout TXID
  • r is total completed prediction rounds
  • m is prediction mark

func PredicitionFavorites added in v0.9.1

func PredicitionFavorites() fyne.CanvasObject

List object for populating favorite dPrediction contracts, with remove favorite control

func PredictConnectedBox

func PredictConnectedBox() fyne.Widget

Check box for dPrediction SCID

  • Hides prediction controls on disconnect

func PredictionListings

func PredictionListings(tab *container.AppTabs) fyne.CanvasObject

List object for populating public dPrediction contracts, with rating and add favorite controls

  • Pass tab for action confirmation reset

func PredictionOwned added in v0.9.1

func PredictionOwned() fyne.CanvasObject

List object for populating owned dPrediction contracts

func PreictionContractEntry

func PreictionContractEntry() fyne.Widget

Entry for dPrediction SCID

  • Bound to Predict.Contract
  • Checks for valid SCID on changed

func S_Results added in v0.9.1

func S_Results(g, gN, l, min, eA, c, tA, tB, tAV, tBV, total string, a, b uint64) (info string)

Formats dSports info string

  • g is game name
  • gN is game number
  • l is league
  • min is minimum Dero wager
  • eA is game end time
  • c is current number of picks
  • tA, tB are team names of A and B
  • tAV, tBV is total picks for A or B
  • total is curent game Dero pot total
  • a, b are current contrct time frames

func SetPredictionInfo added in v0.9.1

func SetPredictionInfo(scid string)

Sets dPrediction info label

func SetPredictionPrices added in v0.9.1

func SetPredictionPrices(d bool)

Update price feed for dPrediction display

func SetPrintColors added in v0.9.3

func SetPrintColors(os string)

Set up terminal log print colors

func SetSportsInfo added in v0.9.1

func SetSportsInfo(scid string)

Set dSports info label

func ShowPredictionControls added in v0.9.2

func ShowPredictionControls()

When called, enable and show dPrediction controls

func SportsConnectedBox

func SportsConnectedBox() fyne.Widget

Check box for dSports SCID

  • Hides sports controls on disconnect

func SportsContractEntry

func SportsContractEntry() fyne.Widget

Entry for dPrediction SCID

  • Bound to Sports.Contractt
  • Checks for valid SCID on changed

func SportsFavorites added in v0.9.1

func SportsFavorites() fyne.CanvasObject

List object for populating favorite dSports contracts, with remove favorite control

func SportsListings

func SportsListings(tab *container.AppTabs) fyne.CanvasObject

List object for populating public dSports contracts, with rating and add favorite controls

  • Pass tab for action confirmation reset

func SportsOwned added in v0.9.1

func SportsOwned() fyne.CanvasObject

List object for populating owned dSports contracts

func SportsPayouts added in v0.9.2

func SportsPayouts() fyne.CanvasObject

Log entry for dSports payout results

func WinningTeam added in v0.9.2

func WinningTeam(teams, winner string) string

Format winning team name from dSports final result string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL