Minesweeper: the final project of the Winchester High School 2017-2018 APCS classes.
These are notes collected during the final project period, mostly by e-mail:
On Thu, May 24, 2018 at 8:59 PM David C. Petty wrote:
https://help.github.com/articles/adding-organization-members-to-a-team/
Apparently, I need to invite you all to this organization: https://github.com/organizations/wps-2017-2018-apcs/ so please let me know your id in class tomorrow.
- dcp
On Sun, Jun 3, 2018 at 9:51 AM David C. Petty wrote:
Good luck. I will read any e-mail you send me, APCS-related or not. Have a great summer!
- dcp
On Mon, Jun 4, 2018 at 7:47 AM David C. Petty wrote:
cd
to the project directory.git pull origin master
. Did you update?mvn package
. Did you build?Have fun!
- dcp
On Mon, Jun 4, 2018 at 10:34 AM David C. Petty wrote:
I don’t know what project you are using. You need to use this project: https://github.com/wps-2017-2018-apcs/whs
- dcp
On Mon, Jun 4, 2018 at 11:00 AM David C. Petty wrote:
OH! I hadn’t enabled write permissions (i.e. git push origin master
) for this organization / repository. I just did. Please let me know if you can now push committed changes.
- dcp
p.s. Let me know when you are having issues like this. Are there any others?
On Tue, Jun 5, 2018 at 11:43 PM David C. Petty wrote:
Hi everyone! It’s great to see that people are able to push to the repository. Here are some observations.
.idea/modules.xml
is <module fileurl=”file://$PROJECT_DIR$/src/main/main.iml” filepath=”$PROJECT_DIR$/src/main/main.iml” />, but each person’s main.iml
file will contain different window settings, etc. and so one person’s version should not override another’s..idea
directory should not be at the top level of the project, so I have moved the .idea
directory to src/misc/.idea
until everyone agrees that it should be removed entirely.src
. the rest of the stuff (mostly in target
) will be built by Maven. The only files added to the .JAR file are those compiled from src/main/java
and src/main/resources
.git add path
, always specify exactly which files you want to add… don’t leave the path off the command. When in doubt, use git status
and you will get a list of ‘untracked files’ that you can copy the paths from.src/main/java/minesweeper
, etc. Also, there should be corresponding package structure in src/main/test/
.git pull origin master
and end each session with git commit -a
followed by git push origin master
.mvn clean package
should work without errors. Use git status
to understand which files have been modified or added.git
thinks every line has changed.More later… have fun!
- dcp
p.s. For those of you not on Discord, I posted the following tonight:
OK... I fixed the build! (And the repository.) Everyone should git pull origin master. If you are working on code in the src directory since your last pull, before you pull, do the following:
- Copy src to another name so that you will save any changes to the Java files you have been working on.
- git fetch --all
- git reset --hard origin/master
Note: fetch is like pull, but with no merges. reset --hard will set you to the current latest branch. DO NOT DO THIS UNLESS YOU HAVE COPIED YOUR WORK ELSEWHERE because all changes to your local repository will be lost.
If you haven't been editing code, simply use git pull origin master next time (and every time) you plan to start editing code.
On Mon, Jun 11, 2018 at 4:39 PM David C. Petty wrote:
https://github.com/wps-2017-2018-apcs/whs/graphs/contributors
Hey, guys & gals… few people seems to be pushing to the repository… it has been a week w/o much progress! Plus, I have almost pushed more commits than the rest of you combined. The best way to run a collaborative project is to collaborate. Push early and often. Share code and communicate. Just sayin’.
I added https://logging.apache.org/log4j/2.x/ logging to the project with the latest commits. git pull origin master
to update. It’s easy to use… every class has a logger. just use logger.info("HERE IS SOME INTERESTING INFORMATION")
whenever you want. You can also do ‘printf-style’ logging using ‘{}’ as a placeholder, e.g. logger.info("{}: x = {}, y = {}", getClass(), x, y);
for variables x
& y
. I also added a default log message in each constructor of logger.info(this);
so as to log something. Have fun!
ALSO, the latest push
was broken. I can’t believe everyone is doing git pull origin master; mvn clean package
at the beginning of every work session, or you would have seen these errors. What gives?!
- dcp
p.s. http://nautil.us/issue/21/information/the-man-who-tried-to-redeem-the-world-with-logic I got this from Tim Peters today… fascinating!
On Tue, Jun 12, 2018 at 1:41 AM David C. Petty wrote:
Gotta git pull origin master
this morning!
src/main/resources/
) that includes the jog4j
parameter file and some images. Feel free to modify or replace them! (Make sure you include sources in credits.txt, if you got them off the web.) I could not find smile.gif
anywhere in the repository, so I added felix.gif
. Feel free to replace it.Button
, Grid
, & Images
. Button
and Grid
are GUI components (perhaps like Tile
?). Images
is a utility class that handles images to put on the buttons.Main
to use a GridBagLayout
. That allows the game window to be resizable. However, it is not perfect, but it works. It would be nice to resize the Grid
with the Frame
, but you will have to figure that out.git pull origin master; mvn clean package javadoc:javadoc exec:java
without error. Just sayin’.- dcp
p.s. Don’t forget to add your name to an @author
tag if you have worked on a file!
p.p.s. Please write more comments.
p.p.p.s. Some people could be working on the test cases in the src/test/
directory.
On Fri, Jun 15, 2018 at 8:18 AM David C. Petty wrote:
Hi, all…
http://www.crisgdwrites.com/minesweeper-can-teach-life/ I updated Images.java
and added images to the repository for all 11 images shown here. (I didn’t make one for a blank tile… that’s just no image.)
All files (including the .SVG files) are in the repository. These images should be square. Their original size is 600x600. I’m not really happy about how they look @ 20x20. Fee free to do better!
I changed Button.java
to randomly show all 11 images. THIS IS JUST TEST CODE to see what the images look like… feel free to put in the real code!
- dcp
On Mon, Jun 18, 2018 at 8:51 AM, David C. Petty wrote:
p.s. mvn javadoc:javadoc
was broken, but most of the errors were self-explanatory and are now fixed — including ones I introduced. The tags are listed here along with specific coding conventions: http://www.oracle.com/technetwork/articles/java/index-137868.html. I was able to add tags for @pre.cond
, @post.cond
, and @to.do
to the POM.
p.p.s. Good luck with your finals and finishing Minesweeper on Wednesday!
On Fri, Jun 22, 2018 at 12:12 PM, David C. Petty wrote::
Greetings everyone! It has been great to have you as students. Here are my final thoughts:
@author
tag. Not really what I was hoping for.Anyway, have a great summer!
- dcp
On Sun, Jul 01, 2018 at 11:47 AM, David C. Petty wrote::
Hi, all… I have been experimenting w/ Github and trying to learn its documentation options. One goal was to have the Javadoc be available to the public, as well as any documents written in src/
. Here is what I have found:
github-pages
. There are several ways to configure it, but I have configured it as (a) in the master
branch and (b) in the docs/
directory. The docs/
directory is further configured as a https://jekyllrb.com/ website, which Github supports serving. Furthermore, this is a repository-specific site just for whs
.mvn site
) that is currently setup in the pom.xml
to (a) include the Javadocs and (b) upload to the docs/site/
directory served at https://wps-2017-2018-apcs.github.io/whs/site/. Do not edit these files directly — they are created by Maven and consist of reports and Javadocs.All three of these are good options for documenting. I would recommend using the github-pages
option, since all you have to do is add the markdown (https://kramdown.gettalong.org/) files to the docs/
directory.
Have fun!
- dcp