Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 139 additions & 0 deletions variants/beta/maharajah/bindata.go

Large diffs are not rendered by default.

369 changes: 369 additions & 0 deletions variants/beta/maharajah/maharajah.go

Large diffs are not rendered by default.

48 changes: 48 additions & 0 deletions variants/beta/maharajah/maharajah_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package maharajah

import (
"testing"
"time"

"github.com/zond/godip"
"github.com/zond/godip/orders"
"github.com/zond/godip/state"

tst "github.com/zond/godip/variants/testing"
)

func init() {
godip.Debug = true
}

func startState(t *testing.T) *state.State {
judge, err := MaharajahStart()
if err != nil {
t.Fatalf("%v", err)
}
return judge
}

func TestMaharajahBuildAnywhere(t *testing.T) {
judge := startState(t)

// Give Delhi an extra SC in Ayu.
judge.SetSC("ayu", Delhi)

// Spring movement
judge.SetOrder("muz", orders.Move("muz", "beg"))
judge.Next()
// Spring retreat
judge.Next()
// Fall movement
judge.SetOrder("awa", orders.Move("awa", "kam"))
judge.Next()
// Fall retreat
judge.Next()

// Fall adjustment - Try to build a new Army in Ayu.
judge.SetOrder("ayu", orders.BuildAnywhere("ayu", godip.Army, time.Now()))
judge.Next()
// Check that it was successful.
tst.AssertUnit(t, judge, "ayu", godip.Unit{godip.Army, Delhi})
}
74 changes: 74 additions & 0 deletions variants/beta/maharajah/svg/army.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
74 changes: 74 additions & 0 deletions variants/beta/maharajah/svg/fleet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6,462 changes: 6,462 additions & 0 deletions variants/beta/maharajah/svg/maharajahmap - backup.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6,291 changes: 6,291 additions & 0 deletions variants/beta/maharajah/svg/maharajahmap.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
10 changes: 5 additions & 5 deletions variants/generator/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from string import Template

# The name of the variant
VARIANT = 'Sengoku'
VARIANT = 'Maharajah'

# Set to true to create an output map where it's easier to check the regions and centers have the right ids.
OVERRIDE_CHECK_MODE = False
Expand All @@ -32,11 +32,11 @@
# The background colour of the land
LAND_COLOR = '#f4d7b5'
# The thickness of thick lines
THICK = 2.225
#THICK = 1.1125
#THICK = 2.225
THICK = 1.1125
# The thickness of thin lines
THIN = 1
#THIN = 0.5
#THIN = 1
THIN = 0.5

IMPASSABLE_PATTERN = '<pattern id="impassable" patternUnits="userSpaceOnUse" width="16" height="16" patternTransform="rotate(35)"><line x1="0" y="0" x2="0" y2="16" stroke="#000000" stroke-opacity="0.1" stroke-width="18" id="impassableLine" /></pattern>'
IMPASSABLE_STYLE = 'fill:url(#impassable);fill-rule:evenodd;stroke:#000000;stroke-width:1'
Expand Down
32 changes: 32 additions & 0 deletions variants/generator/maharajah.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# The first year of the game
START_YEAR: 1501
# The starting units
START_UNITS:
Bahmana:
Army: ['Ahmadnagar','Bijapur']
Fleet: ['Goa']
Delhi:
Army: ['Awadh','Agra','Muzaffarpur']
Gondwana:
Army: ['Jabalpur','Raipur']
Fleet: ['Sambalpur']
Mughalistan:
Army: ['Kabul','Badakhshan','Balkh']
Persia:
Army: ['Meshed','Isfahan']
Fleet: ['Hormuz']
Rajputana:
Army: ['Multan','Jodhpur']
Fleet: ['Jaisalmer']
Vijayanagar:
Army: ['Bangalore','Calicut']
Fleet: ['Pulicat']
# Abbreviations that should be used (rather than letting the script try to guess an abbreviation).
ABBREVIATIONS:
"NICOBAR SEA": "nic"
# Overrides to swap centers. This only needs to contain something if the greedy algorithm fails.
CENTER_OVERRIDES: [
]
# Overrides to swap region names. This only needs to contain something if the greedy algorithm fails.
REGION_OVERRIDES: [
]
3,577 changes: 3,577 additions & 0 deletions variants/generator/maharajah_input.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
549 changes: 549 additions & 0 deletions variants/generator/maharajahdebug.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading