Skip to main content
edited body
Source Link
toolic
  • 16.4k
  • 6
  • 29
  • 221

The code layout is good, and you used meaningful names for classes, functions and variables.

Assuming this code is to be used as a starting point for the students, I recommend adding comments at the top which summarize the purpose of the code (for example, it is a template).

It is good that the code already has generic comments which lead the student, such as:

    # Game specific termination rules.

But, you could formalize that a little bit. Adorn the comments with a unique string, like TBD_COMMENT.
The header comments should also instruct the students to delete the TBD comments and replace them with comments and/or docstrings specific to their code.

Give the student incentive to remove the TBD comments (like 5 points added to their grade for the assignment if the code has no TBD's). With boilerplate code such as this, people often add generic TBD comments. But, the end user never deletes them, leaving behind a lot of clutter.

Here is what the header instructions might look like:

'''"""
TBD_COMMENT

This is a template you can use for your own game.

Once you have added your own code to this template, you must delete
all comments marked as "TBD_COMMENT", and replace them with
comments or docstrings specific to your code.

Remember to replace this header documentation as well.
'''"""

If there are some classes or functions which you require to remain in the code, you should also denote that somehow in the comments.

Similarly, if the student has no need to implement some of the functions, recommend that they be deleted.

The code layout is good, and you used meaningful names for classes, functions and variables.

Assuming this code is to be used as a starting point for the students, I recommend adding comments at the top which summarize the purpose of the code (for example, it is a template).

It is good that the code already has generic comments which lead the student, such as:

    # Game specific termination rules.

But, you could formalize that a little bit. Adorn the comments with a unique string, like TBD_COMMENT.
The header comments should also instruct the students to delete the TBD comments and replace them with comments and/or docstrings specific to their code.

Give the student incentive to remove the TBD comments (like 5 points added to their grade for the assignment if the code has no TBD's). With boilerplate code such as this, people often add generic TBD comments. But, the end user never deletes them, leaving behind a lot of clutter.

Here is what the header instructions might look like:

'''
TBD_COMMENT

This is a template you can use for your own game.

Once you have added your own code to this template, you must delete
all comments marked as "TBD_COMMENT", and replace them with
comments or docstrings specific to your code.

Remember to replace this header documentation as well.
'''

If there are some classes or functions which you require to remain in the code, you should also denote that somehow in the comments.

Similarly, if the student has no need to implement some of the functions, recommend that they be deleted.

The code layout is good, and you used meaningful names for classes, functions and variables.

Assuming this code is to be used as a starting point for the students, I recommend adding comments at the top which summarize the purpose of the code (for example, it is a template).

It is good that the code already has generic comments which lead the student, such as:

    # Game specific termination rules.

But, you could formalize that a little bit. Adorn the comments with a unique string, like TBD_COMMENT.
The header comments should also instruct the students to delete the TBD comments and replace them with comments and/or docstrings specific to their code.

Give the student incentive to remove the TBD comments (like 5 points added to their grade for the assignment if the code has no TBD's). With boilerplate code such as this, people often add generic TBD comments. But, the end user never deletes them, leaving behind a lot of clutter.

Here is what the header instructions might look like:

"""
TBD_COMMENT

This is a template you can use for your own game.

Once you have added your own code to this template, you must delete
all comments marked as "TBD_COMMENT", and replace them with
comments or docstrings specific to your code.

Remember to replace this header documentation as well.
"""

If there are some classes or functions which you require to remain in the code, you should also denote that somehow in the comments.

Similarly, if the student has no need to implement some of the functions, recommend that they be deleted.

Source Link
toolic
  • 16.4k
  • 6
  • 29
  • 221

The code layout is good, and you used meaningful names for classes, functions and variables.

Assuming this code is to be used as a starting point for the students, I recommend adding comments at the top which summarize the purpose of the code (for example, it is a template).

It is good that the code already has generic comments which lead the student, such as:

    # Game specific termination rules.

But, you could formalize that a little bit. Adorn the comments with a unique string, like TBD_COMMENT.
The header comments should also instruct the students to delete the TBD comments and replace them with comments and/or docstrings specific to their code.

Give the student incentive to remove the TBD comments (like 5 points added to their grade for the assignment if the code has no TBD's). With boilerplate code such as this, people often add generic TBD comments. But, the end user never deletes them, leaving behind a lot of clutter.

Here is what the header instructions might look like:

'''
TBD_COMMENT

This is a template you can use for your own game.

Once you have added your own code to this template, you must delete
all comments marked as "TBD_COMMENT", and replace them with
comments or docstrings specific to your code.

Remember to replace this header documentation as well.
'''

If there are some classes or functions which you require to remain in the code, you should also denote that somehow in the comments.

Similarly, if the student has no need to implement some of the functions, recommend that they be deleted.