Skip to content

Commit

Permalink
new aliases to novomatic games added.
Browse files Browse the repository at this point in the history
  • Loading branch information
schwarzlichtbezirk committed Jan 18, 2025
1 parent d3758c0 commit 33f1ac8
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 33 deletions.
23 changes: 9 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,23 @@ Slots games server. Releases functionality for AGT, Novomatic, NetEnt, BetSoft,
Server provides HTTP-based API for popular slots and have well-optimized performance for thousands requests per second. Can be deployed on dedicated server or as portable application for Linux or Windows.

```text
total: 160 games, 78 algorithms, 9 providers
total: 165 games, 78 algorithms, 9 providers
AGT: 56 games
Aristocrat: 4 games
BetSoft: 3 games
Megajack: 4 games
NetEnt: 20 games
Novomatic: 59 games
Novomatic: 64 games
Play'n GO: 3 games
Playtech: 7 games
Slotopol: 4 games
```

*Last added games*:

* '[Golden Prophecies](https://www.slotsmate.com/software/novomatic/golden-prophecies)' Novomatic 5x3 videoslot
* '[Always American](https://www.slotsmate.com/software/novomatic/always-american)' Novomatic 3x3 videoslot
* '[Ultra Gems](https://www.slotsmate.com/software/novomatic/ultra-gems)' Novomatic 3x3 videoslot
* '[Fruitilicious](https://www.slotsmate.com/software/novomatic/fruitilicious)' Novomatic 5x3 videoslot
* '[Jaguar Moon](https://www.slotsmate.com/software/novomatic/jaguar-moon)' Novomatic 5x3, 243 ways videoslot
* '[African Simba](https://www.slotsmate.com/software/novomatic/african-simba)' Novomatic 5x3, 243 ways videoslot
Expand All @@ -38,9 +41,7 @@ Slotopol: 4 games
* '[Book of Ra Deluxe](https://www.slotsmate.com/software/novomatic/book-of-ra-deluxe)' Novomatic 5x3 videoslot
* '[Book of Ra](https://www.slotsmate.com/software/novomatic/book-of-ra-classic)' Novomatic 5x3 videoslot
* '[Gate of Ra Deluxe](https://www.slotsmate.com/software/novomatic/gate-of-ra-deluxe)' Novomatic 5x3 videoslot
* '[Faust](https://freeslotshub.com/novomatic/faust/)' Novomatic 5x3 videoslot
* 'Lord of the Ocean' Novomatic 5x3 videoslot
* '[Valentine's Day](https://demo.agtsoftware.com/games/agt/valentine)' AGT 5x3 videoslot

*Top-10 of most liked games released on server*:

Expand All @@ -52,7 +53,7 @@ Slotopol: 4 games
* '[Egypt](https://demo.agtsoftware.com/games/agt/egypt)' AGT 5x3 videoslot with minislot for wilds multiplier
* 'Fire Joker' Play'n GO 5x3 videoslot with jackpot on lined pays and big symbols on free games
* '[Lucky Lady's Charm Deluxe](https://www.slotsmate.com/software/novomatic/lucky-ladys-charm-deluxe)' Novomatic 5x3 videoslot
* 'Sizzling Hot Deluxe' Novomatic 5x3 videoslot
* '[Sizzling Hot Deluxe](https://www.slotsmate.com/software/novomatic/sizzling-hot-deluxe)' Novomatic 5x3 videoslot
* 'Plenty on Twenty' Novomatic 5x3 videoslot

# How to build from sources
Expand Down Expand Up @@ -171,12 +172,12 @@ You can use token `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzbG90b3BvbCIs
curl -H "Content-Type: application/json" -H "Authorization: Bearer {{token}}" -X GET localhost:8080/refresh
```

## Join and play the game
## Create and play the game

* Join to game. GID received at response will be used at all calls for access to this game instance. Also you will get initial game state, and user balance at this club.
* Create new game. GID received at response will be used at all calls for access to this game instance. Also you will get initial game state, and user balance at this club.

```sh
curl -H "Content-Type: application/json" -H "Authorization: Bearer {{token}}" -d '{"cid":1,"uid":3,"alias":"Novomatic/Joker Dolphin"}' -X POST localhost:8080/game/join
curl -H "Content-Type: application/json" -H "Authorization: Bearer {{token}}" -d '{"cid":1,"uid":3,"alias":"Novomatic/Joker Dolphin"}' -X POST localhost:8080/game/new
```

Endpoint receives `alias` identifier to game that represents as concatenation of provider name and game name with slash. For example, `NetEnt/Tiki Wonders`. Whole list of all supported games can be obtained by [list](docs/list-all.md) command. Identifier turns to lowercase without spaces.
Expand Down Expand Up @@ -211,12 +212,6 @@ curl -H "Content-Type: application/json" -H "Authorization: Bearer {{token}}" -d
curl -H "Content-Type: application/json" -H "Authorization: Bearer {{token}}" -d '{"gid":1}' -X POST localhost:8080/game/info
```

* Part game.

```sh
curl -H "Content-Type: application/json" -H "Authorization: Bearer {{token}}" -d '{"gid":1}' -X POST localhost:8080/game/part
```

## Work with user account

* Check up user account existence. It can be done by email or user identifier (`uid` parameter). Call returns true `uid` and `email` if account is found, or zero user identifier if account does not registered.
Expand Down
19 changes: 12 additions & 7 deletions api/game.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ var (
JoinBuf = SqlStory{}
)

// Make game screen object.
func InitScreen(game any) {
switch game := game.(type) {
case slot.SlotGame:
game.Spin(cfg.DefMRTP)
case keno.KenoGame:
game.Spin(cfg.DefMRTP)
}
}

// Creates new instance of game.
func ApiGameNew(c *gin.Context) {
var err error
Expand Down Expand Up @@ -47,6 +57,7 @@ func ApiGameNew(c *gin.Context) {
Ret404(c, AEC_game_new_noclub, ErrNoClub)
return
}
_ = club

var user *User
if user, ok = Users.Get(arg.UID); !ok {
Expand Down Expand Up @@ -81,13 +92,7 @@ func ApiGameNew(c *gin.Context) {
}

// make game screen object
var rtp = GetRTP(user, club)
switch game := scene.Game.(type) {
case slot.SlotGame:
game.Spin(rtp)
case keno.KenoGame:
game.Spin(rtp)
}
InitScreen(scene.Game)

// insert new story entry
if Cfg.ClubInsertBuffer > 1 {
Expand Down
14 changes: 9 additions & 5 deletions api/logic.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,12 +328,16 @@ func GetScene(gid uint64) (scene *Scene, err error) {
scene = &tmp
Scenes.Set(gid, scene)

var rec Spinlog
if ok, _ = cfg.XormSpinlog.Where("gid = ?").Desc("ctime").Get(&rec); !ok {
return
if Cfg.UseSpinLog {
var rec Spinlog
if ok, _ = cfg.XormSpinlog.Where("gid = ?").Desc("ctime").Get(&rec); !ok {
return
}
scene.SID = rec.SID
err = json.Unmarshal(util.S2B(rec.Game), scene.Game)
} else {
InitScreen(scene.Game)
}
scene.SID = rec.SID
err = json.Unmarshal(util.S2B(rec.Game), scene.Game)
return
}

Expand Down
9 changes: 7 additions & 2 deletions docs/list-all.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
'African Simba' Novomatic 5x3 videoslot
'Age of Heroes' Novomatic 5x3 videoslot
'Aladdin' AGT 5x4 videoslot
'Always American' Novomatic 3x3 videoslot
'Always Hot Deluxe' Novomatic 3x3 videoslot
'Always Hot' Novomatic 3x3 videoslot
'American Keno' Aristocrat 80 spots lottery
'Anonymous' AGT 5x3 videoslot
Expand Down Expand Up @@ -69,6 +71,7 @@
'Gate of Ra Deluxe' Novomatic 5x3 videoslot
'Geisha Wonders' NetEnt 5x3 videoslot
'God of Sun' Novomatic 5x3 videoslot
'Golden Prophecies' Novomatic 5x3 videoslot
'Golden Tour' Playtech 5x3 videoslot
'Grand Theft' AGT 5x3 videoslot
'Great Blue' Playtech 5x3 videoslot
Expand Down Expand Up @@ -153,6 +156,8 @@
'Time Machine II' AGT 5x3 videoslot
'Trolls' NetEnt 5x3 videoslot
'Tropic Hot' AGT 3x3 videoslot
'Ultra Gems' Novomatic 3x3 videoslot
'Ultra Hot Deluxe' Novomatic 3x3 videoslot
'Ultra Hot' Novomatic 3x3 videoslot
'Unicorn Magic' Novomatic 5x3 videoslot
'Valentine's Day' AGT 5x3 videoslot
Expand All @@ -163,13 +168,13 @@
'Wild Witches' NetEnt 5x3 videoslot
'Wizard' AGT 5x4 videoslot
total: 160 games, 78 algorithms, 9 providers
total: 165 games, 78 algorithms, 9 providers
AGT: 56 games
Aristocrat: 4 games
BetSoft: 3 games
Megajack: 4 games
NetEnt: 20 games
Novomatic: 59 games
Novomatic: 64 games
Play'n GO: 3 games
Playtech: 7 games
Slotopol: 4 games
Expand Down
4 changes: 3 additions & 1 deletion game/slot/novomatic/alwayshot/alwayshot_link.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import (
var Info = game.GameInfo{
Aliases: []game.GameAlias{
{Prov: "Novomatic", Name: "Always Hot"},
{Prov: "AGT", Name: "Tropic Hot"}, // see: https://demo.agtsoftware.com/games/agt/tropichot
{Prov: "Novomatic", Name: "Always Hot Deluxe"}, // see: https://www.slotsmate.com/software/novomatic/always-hot-deluxe
{Prov: "Novomatic", Name: "Always American"}, // see: https://www.slotsmate.com/software/novomatic/always-american
{Prov: "AGT", Name: "Tropic Hot"}, // see: https://demo.agtsoftware.com/games/agt/tropichot
},
GP: game.GPfgno,
SX: 3,
Expand Down
2 changes: 1 addition & 1 deletion game/slot/novomatic/alwayshot/alwayshot_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,5 @@ func (g *Game) Spin(mrtp float64) {
}

func (g *Game) SetSel(sel int) error {
return slot.ErrNoFeature
return g.SetSelNum(sel, len(BetLines))
}
1 change: 1 addition & 0 deletions game/slot/novomatic/bookofra/bookofra_link.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ var Info = game.GameInfo{
{Prov: "Novomatic", Name: "Book of Ra"}, // see: https://www.slotsmate.com/software/novomatic/book-of-ra-classic
{Prov: "Novomatic", Name: "Book of Ra Deluxe"}, // see: https://www.slotsmate.com/software/novomatic/book-of-ra-deluxe
{Prov: "Novomatic", Name: "Gate of Ra Deluxe"}, // see: https://www.slotsmate.com/software/novomatic/gate-of-ra-deluxe
{Prov: "Novomatic", Name: "Golden Prophecies"}, // see: https://www.slotsmate.com/software/novomatic/golden-prophecies
{Prov: "Novomatic", Name: "Down Under"},
{Prov: "Novomatic", Name: "God of Sun"},
{Prov: "Novomatic", Name: "Lord of the Ocean"},
Expand Down
4 changes: 3 additions & 1 deletion game/slot/novomatic/ultrahot/ultrahot_link.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import (

var Info = game.GameInfo{
Aliases: []game.GameAlias{
{Prov: "Novomatic", Name: "Ultra Hot"},
{Prov: "Novomatic", Name: "Ultra Hot"}, // see: https://www.slotsmate.com/software/novomatic/ultra-hot
{Prov: "Novomatic", Name: "Ultra Hot Deluxe"}, // see: https://www.slotsmate.com/software/novomatic/ultrahot-deluxe
{Prov: "Novomatic", Name: "Ultra Gems"}, // see: https://www.slotsmate.com/software/novomatic/ultra-gems
},
GP: game.GPfgno |
game.GPfill,
Expand Down
4 changes: 3 additions & 1 deletion game/slot/novomatic/ultrahot/ultrahot_rule.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package ultrahot

// See: https://www.slotsmate.com/software/novomatic/ultra-hot

import (
_ "embed"

Expand Down Expand Up @@ -87,5 +89,5 @@ func (g *Game) Spin(mrtp float64) {
}

func (g *Game) SetSel(sel int) error {
return slot.ErrNoFeature
return g.SetSelNum(sel, len(BetLines))
}
2 changes: 1 addition & 1 deletion task/build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ cp -ruv "$wd/appdata/"* "$GOPATH/bin/config"
# dockerfile has no access to git repository,
# so update content of this variable by
# echo $(git describe --tags)
buildvers="v0.7.0-18-g18796c4"
buildvers="v0.7.0-21-gd3758c0"
# See https://tc39.es/ecma262/#sec-date-time-string-format
# time format acceptable for Date constructors.
buildtime=$(date +'%FT%T.%3NZ')
Expand Down

0 comments on commit 33f1ac8

Please sign in to comment.