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
Conversation
There was a problem hiding this 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 |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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(){} |
There was a problem hiding this comment.
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.
lib/model/order.dart
Outdated
|
||
class Move extends Order{} | ||
|
||
class Support extends Order{} |
There was a problem hiding this comment.
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 = {}; | ||
} |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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.
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