Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Classical crowded #179

Merged
merged 21 commits into from
Feb 9, 2024
Merged

Classical crowded #179

merged 21 commits into from
Feb 9, 2024

Conversation

timothyjbrooks
Copy link
Contributor

Using the original map,this variant adds in the powers of Scandinavia, Iberia, Benelux, and the Balkans.

Copy link
Collaborator

@tttppp tttppp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please could we have a statement about the svgs for the flags? Did you create them? Are we ok to use them?

Incidentally - I don't think it's necessary to repeat the units and flags from the Classical variant. We should be able to reuse the existing declaration.

PhaseTypes = []godip.PhaseType{godip.Movement, godip.Retreat, godip.Adjustment}
Seasons = []godip.Season{godip.Spring, godip.Fall}
UnitTypes = []godip.UnitType{godip.Army, godip.Fleet}
SVGUnits = map[godip.UnitType]func() ([]byte, error){
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be able to reuse the existing images:

SVGUnits:    classical.SVGUnits,

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact I think we only need to define Nations and SVGFlags here - the rest can be reused from Classical.

},
Start: ClassicalCrowdedStart,
Blank: ClassicalCrowdedBlank,
BlankStart: func() (result *state.State, err error) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to define this here. Only Classical contains it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding the different nations changes the start units which is set in ClassicalCrowdedStart, or am I getting that mixed up?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variant's nations are set below in the line:

Nations:    Nations,

SVGVersion: "9",
SVGUnits: SVGUnits,
SVGFlags: SVGFlags,
CreatedBy: "Timothy J. Brooks",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't actually have a ImplementedBy field. That would be a nice feature, but you will always be credited in the git history as having implemented this variant. I think this should be CreatedBy: "Unknown" based on what vDip says?

SVGFlags: SVGFlags,
CreatedBy: "Timothy J. Brooks",
Version: "",
Description: "An expanded version of the original Diplomacy.",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be nice to mention that there are four extra nations.

}
}
Parser = classical.Parser
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the only special variables you need to declare in this block are Nations and SVGFlags. All the others you can just reference as classical.Whatever. I think that you need to do something slightly different for SVGFlags, otherwise you won't get the seven standard flags included.

return phase.Ty == godip.Retreat && phase.Se == godip.Fall
}

func NewPhase(year int, season godip.Season, typ godip.PhaseType) godip.Phase {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think NewPhase or AdjustSCs are needed either.

}
}

var provinceLongNames = map[godip.Province]string{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't need this - in France vs Austria we just use:

ProvinceLongNames: classical.ClassicalVariant.ProvinceLongNames

Balkans: "#CD926A",
Benelux: "#F79D10",
Iberia: "#A6517B",
Scandinavia: "#436186",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need to also include the classical nation colours.

return Asset("../classical/svg/turkey.svg")
},
}
Parser = classical.Parser
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can just write classical.Parser below - instead of declaring a new variable up here.

@tttppp tttppp merged commit a947efe into zond:master Feb 9, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants