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

Samuel provinces #4

Merged
merged 33 commits into from Nov 12, 2021
Merged

Samuel provinces #4

merged 33 commits into from Nov 12, 2021

Conversation

SamuelSHernandez
Copy link
Contributor

All stubs are created. I'm unsure about some type declarations. I think these are changes other people might need. Let me know if you have any comments or questions

Copy link
Collaborator

@WillHensel WillHensel left a comment

Choose a reason for hiding this comment

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

Add a main function to each test file that contains one test. Call the test something like "Test <class_name> Fields and Types". Test each field in the class according to the specification in the diagram by using expect(<instance>.<field>, isA<Unit>()) replacing the "<instance>" and "<field>" with the appropriate values and "Unit" with whatever the type should be. Make sure tests pass locally with dart test then make sure the pipeline in github passes (it currently fails).

.idea/.gitignore Outdated
@@ -0,0 +1,3 @@
# Default ignored files
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's add the .idea directory to the .gitignore file and remove it from the repo.


part of model;

class Order {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be abstract.


class Order {
Province destination = '' as Province;
void resolve(){}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Making the class abstract will remove the need to have a function body. Subclasses should override resolve.


class Move extends Order{}

class Support extends Order{}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Support has a unit field

class Player {
String name = "";
Set<Country> allegiances = {};
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

No newline at end of file.

UnitType type = '' as UnitType;
}

class UnitType {
Copy link
Collaborator

Choose a reason for hiding this comment

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

UnitType should be an enumeration.

@SamuelSHernandez SamuelSHernandez merged commit 1261eaa into main Nov 12, 2021
@SamuelSHernandez SamuelSHernandez deleted the samuel-provinces branch November 12, 2021 00:57
@WillHensel WillHensel restored the samuel-provinces branch November 12, 2021 01:29
@WillHensel WillHensel deleted the samuel-provinces branch December 2, 2021 02:31
@WillHensel WillHensel restored the samuel-provinces branch December 2, 2021 02:31
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.

None yet

2 participants