commit b1a8ce7352d8f0846f4daf1bceb3dfffa57fdc95 Author: Paul Scott Date: Mon Mar 13 20:34:59 2023 +1100 Initial add diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fdc06a1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,22 @@ +.DS_Store +*.orig +*.rej +*~ +bin +out +.idea/shelf/ +.idea/workspace.xml +.idea/uiDesigner.xml +.idea/vcs.xml +.idea/compiler.xml +.idea/copyright/ +.idea/codeStyles/ +.idea/emacs.xml +.idea/encodings.xml +.idea/gradle.xml +.idea/description.html +issues.csv +comp1110-ass2.jar +game.jar +games/* +public diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..fd4b4d9 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,49 @@ +image: paulwarfie/comp1110-2023-s1-gitlab-ci:0.1.0 + +stages: + - checksum + - compliance + - build + - test + +before_script: + - export PATH_TO_FX=/usr/share/openjfx/lib + - export JAVAFX_OPTIONS="--module-path $PATH_TO_FX --add-modules javafx.controls,javafx.fxml,javafx.media" + - export CP=src:/ass2/*:/shared/junit-platform-console-standalone-1.7.0.jar:$PATH_TO_FX/* + - export JUNIT="java $JAVAFX_OPTIONS -jar /shared/junit-platform-console-standalone-1.7.0.jar --class-path src:/ass2/comp1110-ass2.jar --disable-banner" + +checksum: + tags: + - comp1110 + stage: checksum + script: + - python3 /validate.py --integrity comp1110-ass2 + except: + variables: + - $CI_PROJECT_NAME =~ /.*-dev$/ + +compliance: + tags: + - comp1110 + stage: compliance + script: + - python3 /validate.py --gitlablogin ${GITLAB_USER_LOGIN} --gitlabuser "${GITLAB_USER_NAME}" --gitlabprojectname "${CI_PROJECT_NAME}" --assignment /ass2/compliance-ass2.yml + except: + variables: + - $CI_PROJECT_NAME =~ /.*-dev$/ + allow_failure: true + +build: + tags: + - comp1110 + stage: build + script: + - javac -encoding utf-8 $JAVAFX_OPTIONS -cp $CP src/comp1110/ass2/*.java src/comp1110/ass2/*/*.java + artifacts: + paths: + - src/comp1110/ass2/*.class + - src/comp1110/ass2/*/*.class + +## Local Variables: +## mode: yaml +## End: diff --git a/.idea/jsonSchemas.xml b/.idea/jsonSchemas.xml new file mode 100644 index 0000000..a752df1 --- /dev/null +++ b/.idea/jsonSchemas.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/JUnit5.xml b/.idea/libraries/JUnit5.xml new file mode 100644 index 0000000..6b7ae70 --- /dev/null +++ b/.idea/libraries/JUnit5.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/javafx.xml b/.idea/libraries/javafx.xml new file mode 100644 index 0000000..db49101 --- /dev/null +++ b/.idea/libraries/javafx.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..90ca720 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..b797cd5 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations/Game.xml b/.idea/runConfigurations/Game.xml new file mode 100644 index 0000000..d5ec111 --- /dev/null +++ b/.idea/runConfigurations/Game.xml @@ -0,0 +1,16 @@ + + + + \ No newline at end of file diff --git a/.idea/runConfigurations/Viewer.xml b/.idea/runConfigurations/Viewer.xml new file mode 100644 index 0000000..abe2584 --- /dev/null +++ b/.idea/runConfigurations/Viewer.xml @@ -0,0 +1,16 @@ + + + + \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..dac0cb4 --- /dev/null +++ b/README.md @@ -0,0 +1,294 @@ +# COMP1110 Assignment 2 + +## Academic Honesty and Integrity + +Honesty and integrity are of utmost importance. These goals are *not* at odds +with being resourceful and working collaboratively. You *should* be +resourceful, you should collaborate within your team, and you should discuss +the assignment and other aspects of the course with others taking the class. +However, *you must never misrepresent the work of others as your own*. If you +have taken ideas from elsewhere or used code sourced from elsewhere, you must +say so with *utmost clarity*. At each stage of the assignment you will be asked +to submit a statement of originality, either as a group or as individuals. This +statement is the place for you to declare which ideas or code contained in your +submission were sourced from elsewhere. + +Please read the ANU's [official position](http://academichonesty.anu.edu.au/) +on academic honesty. If you have any questions, please ask me. + +Carefully review the statements of originality in the [admin](admin) folder +which you must complete at each stage. Edit the relevant statement and update +it as you complete each stage of the assignment, ensuring that when you +complete each stage, a truthful statement is committed and pushed to your repo. + +## Purpose + +In this assignment you will *work as a group* to master a number of major +themes of this course, including software design and implementation, group +work, using development tools such as Git and IntelliJ, and using JavaFX to +build a user interface. **Above all, this assignment will emphasize group +work**; while you will receive an individual mark for your work based on your +contributions to the assignment, **you can only succeed if all members +contribute to your group's success**. + +## Assignment Deliverables + +The assignment is worth 30% of your total assessment, and it will be +marked out of 30. So each mark in the assignment corresponds to a +mark in your final assessment for the course. Note that for some +stages of the assignment, you will get a _group_ mark, and for others +you will be _individually_ marked. The mark breakdown and the due +dates are described on the +[deliverables](https://cs.anu.edu.au/courses/comp1110/assessments/deliverables/) +page. + +Your tutor will mark your work via GitLab, so it is essential that you +carefully follow instructions for setting up and maintaining your group +repository. You will be marked according to whatever is committed to your +repository at the time of the deadline. You will be assessed on how effectively +you use Git as a development tool. + +## Problem Description + +Your task is to implement in Java, using JavaFX, a board game called the +[Blue Lagoon](https://boardgamegeek.com/boardgame/244331/blue-lagoon). +The design of the game and all imagery shown in this README comes from +the game publishers, Blue Orange Games. You should either be creating +your own artwork or making use of other works with an appropriate license. + +![Blue Lagoon Box](assets/images/blue_lagoon_box.png) + +A copy of the [rulebook](assets/rules/rulebook.pdf) has been provided from the +[official site](https://blueorangegames.eu/en/games/blue-lagoon/). + +You can also find several video tutorials explaining how to play the game +online, for example [this video](https://www.youtube.com/watch?v=0q1hWfH9S_8). + +## Game Overview + +In Blue Lagoon, you play as a seafaring tribe on a quest to settle and explore +a newly discovered archipelago. Enlisting the help of all the settlers in your +tribe to claim territory, and scavenging the resources you find, you will make +history as one of the first tribes on the archipelago. But be careful! Other +tribes have found the islands too, and it's a race to the top to see who can +end up the most renowned tribe of the archipelago. + +Blue Lagoon is a board game for 2-4 players. Each player manages a group +of settlers who will be finding precious resources and claiming islands in +the newly discovered archipelago. + +The game is played over two phases - the exploration phase followed by the +settlement phase. On a player's turn, they will be playing one of the tokens +from their hand on to the board in order to work towards claiming resources +and islands. At the end of each phase points are scored based on the islands +each player claims and the resources they collect. Highest score wins! + +An overview of the game rules is given below. Use this, in addition to the +resources linked above. If anything is unclear, please consult +the [class forum](https://edstem.org/au/courses/10706/discussion/) for clarification. + +## Game Rules + +It is strongly encouraged to read the [rulebook](assets/rules/rulebook.pdf). +Though a brief overview of the rules will be provided here. + +### Overview + +#### Game +The game is played over two different phases - the exploration phase, and +then the settlement phase. The score is counted at the end of each phase, the +highest score wins! + +#### Components + +All players start with 5 villages. In a 2 player game each player has 30 settlers, +in a 3 player game 25 settlers and a 4 player game 20 settlers. + +There are 24 resources (coconuts, bamboo, water and precious stones) +and 8 additional statuettes (important: these are counted separately +to resources). All resources and statuettes will be randomly distributed +amongst the stone circles on the board at the start of the game. + +The standard game is played on the below game board. On the game board you can +see eight different islands (each with a score attached) and 32 stone circles +which will hold the resources and statuettes. You will also see that the board +can be divided up into land tiles and water tiles. + +Blue Lagoon Game Board + +### Exploration Phase + +Each player sequentially takes turns playing a piece from their collection of +settler and village tokens. + +The rules for playing a piece are as follows: +- A settler can be placed on any unoccupied water space +- A settler or a village can be placed on any unoccupied land space adjacent to one of their pieces. + +If a piece is placed on a stone circle, the player instantly claims the resource in that space +into their hand. + +### End of Exploration Phase + +Once either of the end of phase conditions occur, +points are scored and the settlement phase begins. + +#### End of Phase Conditions +The exploration phase ends when either: +- All resources (not including statuettes) have been collected +- No player has any remaining moves available + +#### Scoring Exploration Phase + +The rules for scoring are as below. Please refer to page 3 of +the rulebook for scoring examples. + +**Total Islands** + +Players with pieces on eight or more islands score 20 points. +Players with pieces on exactly seven islands score 10 points. +Otherwise, 0 points are scored. + +**Links** + +A (potentially) branching path of neighbouring settlers and villages +belonging to a player forms a chain. Players earn points from the chain +of their pieces which links the most islands. Players earn 5 points +per linked island in this chain. + +**Majorities** + +The player with the most pieces on an island scores +the points indicated on the board for that island. +In the case of a tie, the points are divided evenly +between the tied players, rounding down. + +**Resources** + +Players score points for the resources they claimed during the phase. + +For each resource type (coconuts, bamboo, water and precious stones), +each player receives the following points: +- 4+ of a kind: 20 points +- 3 of a kind: 10 points +- 2 of a kind: 5 points + +Additionally, if a player has collected all 4 different resources, they get 10 bonus points. + +**Statuettes** + +Players receive 4 points per claimed statuette. + +### Settlement Phase + +#### Setup +All settlers, resources and statuettes are removed from the board, as well +as villages placed on stone circles. All villages except for those remaining +on the board are discarded. + +All resources and statuettes are then randomly distributed amongst the +stone circles again. + +The player after the player who ended the exploration phase +has the first turn. + +#### Play + +Play continues, this time however players may only place settlers +next to pieces they already own. That is, one cannot play on an +unoccupied water space anymore unless it is adjacent to one of +their pieces. + +### End of Game + +The settlement phase ends using the exact same conditions as the +exploration phase. + +Once the settlement phase ends, the score is again calculated +using the same scoring system. + +Each player adds the scores between the 2 phases. + +The most points wins! If there is a tie, the player +with the most resources and statuettes wins. Otherwise, +the tied players share the victory! + +## Encoding for Testing + +*More details of the `BlueLagoon` class and the string encoding used +for interfacing with tests will be included here after D2B is complete.* + +## Your High Level Task + +Create a fully working game, using JavaFX to implement a playable +graphical version of the game in a 1200x700 window. + +Notice that aside from the window size, the details of exactly how the +game looks etc., are **intentionally** left up to you. You may choose to +closely follow the look of the original board game, or you may choose to +present the game in a totally different manner. + +The only **firm** requirements on the GUI are that: + +* Your game must run using Java 17 and JavaFX 17. +* Your implementation must respect the specification of the game rules + given here. +* Your game must be easy to play. +* Your game must run in a 1200x700 window. +* Your game must be executable on a standard lab machine from a jar file + automatically built from your project called `game.jar` (as outlined in + [D2E]). + +In addition to the main GUI, the backend of your game (the part that +implements the game logic) should be linked to the static methods +declared in `BlueLagoon.java` so that we can test your implementation. + +## Evaluation Criteria + +[deliverables]: https://comp.anu.edu.au/courses/comp1110/assessments/deliverables/ + +It is essential that you refer to the **[deliverables]** page to check +that you understand each of the **deadlines**, what is required, and the +**mark breakdown**. This assignment has multiple deliverables, D2A to D2G. +A significant part of your assignment will be marked via tests run through +gitlab's continuous integration (CI) framework, so all submittable materials +will need to be committed and pushed to gitlab and in the *correct* locations, +as prescribed by the [deliverables] page. + +*Some* marks in deliverables are attributed to the completion (and tests +passing if relevant) of specific **tasks**. There are 17 tasks (from #1 through +to #17) that are outlined in gitlab **issues** associated with your team's fork +of the assignment 2 project. Not all tasks have tests associated with them, +instead some will be manually marked. + +**Importantly** not all activities you will have to perform to complete a +deliverable are covered by a task, instead refer to the [deliverables]. + +The deliverables that depend on tasks are summarised as: + +* [D2A]: task #1 +* [D2B]: task #2 +* [D2C]: tasks #3 to #8 +* [D2F]: tasks #9 to #17 (and tasks #3, #4, #6, #7, #8 to a small degree) + +[D2A]: https://comp.anu.edu.au/courses/comp1110/assessments/deliverables/#D2A +[D2B]: https://comp.anu.edu.au/courses/comp1110/assessments/deliverables/#D2B +[D2C]: https://comp.anu.edu.au/courses/comp1110/assessments/deliverables/#D2C +[D2E]: https://comp.anu.edu.au/courses/comp1110/assessments/deliverables/#D2E +[D2F]: https://comp.anu.edu.au/courses/comp1110/assessments/deliverables/#D2F + +The tasks (mostly) increase in difficulty the higher the task number. However, +note that the GUI-related tasks will generally require significantly more work +than other tasks related to backend game logic. + +Some, but not all, tasks will depend on the completion of earlier tasks. For +example, a later task might build on or make use of game logic developed as +part of an earlier task. We don't make these dependencies explicit because +the relationships should become relatively apparent after a bit of design +work (and they will depend somewhat on your design). + +Keep the relative difficulty and the potential dependencies between tasks +in mind when negotiating which team member will work on what tasks. Try to +structure things so that you can work relatively independently, or otherwise +agree on some clear internal deadlines when one member relies on the output +of another. diff --git a/admin/B-contribution.yml b/admin/B-contribution.yml new file mode 100644 index 0000000..9019e4a --- /dev/null +++ b/admin/B-contribution.yml @@ -0,0 +1,26 @@ +# IMPORTANT: It is very important that you correctly complete this contribution +# statement. + +declaration: >- + We declare that the work toward our submission of Stage B was distributed among the group members as follows: + +# State your contributions as integers out of 100. The total contribution should +# be 100 or 99 (33/33/33 is fine). (Remove entries if you have fewer than three +# members). +contributions: + - uid: + contribution: + - uid: + contribution: + - uid: + contribution: + +# Sign *your* name and uids here. (Remove entries if you have fewer +# than three members) +signatures: + - name: + uid: + - name: + uid: + - name: + uid: \ No newline at end of file diff --git a/admin/B-originality.yml b/admin/B-originality.yml new file mode 100644 index 0000000..6fcc06d --- /dev/null +++ b/admin/B-originality.yml @@ -0,0 +1,58 @@ +# IMPORTANT: It is very important that you correctly complete this originality +# statement. +# +# This is your statement of your submitted work being your own. +# Incorrectly filling out this statement could lead to charges +# of academic misconduct. +# +# For information on how to fill this out correctly, see +# https://cs.anu.edu.au/courses/comp1110/help/faq/09-originality/ +# + +declaration: >- + We declare that everything we have submitted for Stage B of this assignment + and all stages before it is entirely our own work, with the following + exceptions: + +# Use this to list names of people who you collaborated with, and a +# comment about what you collaborated on. +# +# Add as many "name+comment" entries as necessary +# (or remove it altogether if you haven't collaborated with anyone) +collaboration: + - name: + comment: >- + +# Use this to list any code that you used that you did not write, +# aside from code provided by the lecturer. Provide a comment +# explaining your use and the URL to that code and the licence for +# that code +# +# Add as many "url+licence+comment" entries as necessary +# (or remove it altogether if you haven't used any external code) +code: + - comment: + url: + licence: + +# Use this to list any assets (artwork, sound, etc) that you used. +# Provide a comment explaining your use of that asset and the URL +# and license for the asset +# +# Add as many "url+licence+comment" entries as necessary +# (or remove it altogether if you haven't used any external assets) +assets: + - comment: + url: + licence: + + +# Sign *your* name and uids here. (Remove entries if you have fewer +# than three members.) +signatures: + - name: + uid: + - name: + uid: + - name: + uid: diff --git a/admin/C-best-u1234567.yml b/admin/C-best-u1234567.yml new file mode 100644 index 0000000..26f816e --- /dev/null +++ b/admin/C-best-u1234567.yml @@ -0,0 +1,51 @@ +# IMPORTANT: It is very important that you correctly complete this originality +# statement. +# +# This is your statement of your submitted work being your own. +# Incorrectly filling out this statement could lead to charges +# of academic misconduct. +# +# For information on how to fill this out correctly, see +# https://cs.anu.edu.au/courses/comp1110/help/faq/09-originality/ +# + +declaration: >- + I submit the work below for assessment as my best work. I declare that this + is entirely my own work, with the following documented exceptions: + +# Use this to list names of people who you collaborated with, and a +# comment about what you collaborated on. +# +# Add as many "name+comment" entries as necessary +# (or remove it altogether if you haven't collaborated with anyone) +collaboration: + - name: + comment: >- + +# Use this to list any code that you used that you did not write, +# aside from code provided by the lecturer. Provide a comment +# explaining your use and the URL to that code and the licence for +# that code +# +# Add as many "url+licence+comment" entries as necessary +# (or remove it altogether if you haven't used any external code) +code: + - comment: + url: + licence: + +# I wish to submit the following classes as entirely my own (remove this if +# you want to just submit methods): +class: + - + - + +# I wish to submit the following methods as entirely my own (remove this if +# you want to just submit classes): +method: + - + - + +# sign *your* name and uid here +name: +uid: diff --git a/admin/C-contribution.yml b/admin/C-contribution.yml new file mode 100644 index 0000000..5911a19 --- /dev/null +++ b/admin/C-contribution.yml @@ -0,0 +1,26 @@ +# IMPORTANT: It is very important that you correctly complete this contribution +# statement. + +declaration: >- + We declare that the work toward our submission of Stage C was distributed among the group members as follows: + +# State your contributions as integers out of 100. The total contribution should +# be 100 or 99 (33/33/33 is fine). (Remove entries if you have fewer than three +# members). +contributions: + - uid: + contribution: + - uid: + contribution: + - uid: + contribution: + +# Sign *your* name and uids here. (Remove entries if you have fewer +# than three members) +signatures: + - name: + uid: + - name: + uid: + - name: + uid: \ No newline at end of file diff --git a/admin/C-originality.yml b/admin/C-originality.yml new file mode 100644 index 0000000..54b883a --- /dev/null +++ b/admin/C-originality.yml @@ -0,0 +1,58 @@ +# IMPORTANT: It is very important that you correctly complete this originality +# statement. +# +# This is your statement of your submitted work being your own. +# Incorrectly filling out this statement could lead to charges +# of academic misconduct. +# +# For information on how to fill this out correctly, see +# https://cs.anu.edu.au/courses/comp1110/help/faq/09-originality/ +# + +declaration: >- + We declare that everything we have submitted for Stage C of this assignment + and all stages before it is entirely our own work, with the following + exceptions: + +# Use this to list names of people who you collaborated with, and a +# comment about what you collaborated on. +# +# Add as many "name+comment" entries as necessary +# (or remove it altogether if you haven't collaborated with anyone) +collaboration: + - name: + comment: >- + +# Use this to list any code that you used that you did not write, +# aside from code provided by the lecturer. Provide a comment +# explaining your use and the URL to that code and the licence for +# that code +# +# Add as many "url+licence+comment" entries as necessary +# (or remove it altogether if you haven't used any external code) +code: + - comment: + url: + licence: + +# Use this to list any assets (artwork, sound, etc) that you used. +# Provide a comment explaining your use of that asset and the URL +# and license for the asset +# +# Add as many "url+licence+comment" entries as necessary +# (or remove it altogether if you haven't used any external assets) +assets: + - comment: + url: + licence: + + +# Sign *your* name and uids here. (Remove entries if you have fewer +# than three members.) +signatures: + - name: + uid: + - name: + uid: + - name: + uid: diff --git a/admin/D-originality-u1234567.yml b/admin/D-originality-u1234567.yml new file mode 100644 index 0000000..52574d7 --- /dev/null +++ b/admin/D-originality-u1234567.yml @@ -0,0 +1,52 @@ +# IMPORTANT: It is very important that you correctly complete this originality +# statement. +# +# This is your statement of your submitted work being your own. +# Incorrectly filling out this statement could lead to charges +# of academic misconduct. +# +# For information on how to fill this out correctly, see +# https://cs.anu.edu.au/courses/comp1110/help/faq/09-originality/ +# + +declaration: >- + I declare that everything I have submitted for stage D of this assignment + and all stages before it is entirely my own work, with the following + exceptions: + +# Use this to list names of people who you collaborated with, and a +# comment about what you collaborated on. +# +# Add as many "name+comment" entries as necessary +# (or remove it altogether if you haven't collaborated with anyone) +collaboration: + - name: + comment: >- + +# Use this to list any code that you used that you did not write, +# aside from code provided by the lecturer. Provide a comment +# explaining your use and the URL to that code and the licence for +# that code +# +# Add as many "url+licence+comment" entries as necessary +# (or remove it altogether if you haven't used any external code) +code: + - comment: + url: + licence: + +# Use this to list any assets (artwork, sound, etc) that you used. +# Provide a comment explaining your use of that asset and the URL +# and license for the asset +# +# Add as many "url+licence+comment" entries as necessary +# (or remove it altogether if you haven't used any external assets) +assets: + - comment: + url: + licence: + + +# sign *your* name and uid here +name: +uid: diff --git a/admin/E-contribution.yml b/admin/E-contribution.yml new file mode 100644 index 0000000..4c9d1eb --- /dev/null +++ b/admin/E-contribution.yml @@ -0,0 +1,26 @@ +# IMPORTANT: It is very important that you correctly complete this contribution +# statement. + +declaration: >- + We declare that the work toward our submission of Stage E was distributed among the group members as follows: + +# State your contributions as integers out of 100. The total contribution should +# be 100 or 99 (33/33/33 is fine). (Remove entries if you have fewer than three +# members). +contributions: + - uid: + contribution: + - uid: + contribution: + - uid: + contribution: + +# Sign *your* name and uids here. (Remove entries if you have fewer +# than three members) +signatures: + - name: + uid: + - name: + uid: + - name: + uid: \ No newline at end of file diff --git a/admin/E-originality.yml b/admin/E-originality.yml new file mode 100644 index 0000000..3a4ece6 --- /dev/null +++ b/admin/E-originality.yml @@ -0,0 +1,58 @@ +# IMPORTANT: It is very important that you correctly complete this originality +# statement. +# +# This is your statement of your submitted work being your own. +# Incorrectly filling out this statement could lead to charges +# of academic misconduct. +# +# For information on how to fill this out correctly, see +# https://cs.anu.edu.au/courses/comp1110/help/faq/09-originality/ +# + +declaration: >- + We declare that everything we have submitted for Stage E of this assignment + and all stages before it is entirely our own work, with the following + exceptions: + +# Use this to list names of people who you collaborated with, and a +# comment about what you collaborated on. +# +# Add as many "name+comment" entries as necessary +# (or remove it altogether if you haven't collaborated with anyone) +collaboration: + - name: + comment: >- + +# Use this to list any code that you used that you did not write, +# aside from code provided by the lecturer. Provide a comment +# explaining your use and the URL to that code and the licence for +# that code +# +# Add as many "url+licence+comment" entries as necessary +# (or remove it altogether if you haven't used any external code) +code: + - comment: + url: + licence: + +# Use this to list any assets (artwork, sound, etc) that you used. +# Provide a comment explaining your use of that asset and the URL +# and license for the asset +# +# Add as many "url+licence+comment" entries as necessary +# (or remove it altogether if you haven't used any external assets) +assets: + - comment: + url: + licence: + + +# Sign *your* name and uids here. (Remove entries if you have fewer +# than three members.) +signatures: + - name: + uid: + - name: + uid: + - name: + uid: diff --git a/admin/E-review-u1234567.md b/admin/E-review-u1234567.md new file mode 100644 index 0000000..d65cfb5 --- /dev/null +++ b/admin/E-review-u1234567.md @@ -0,0 +1,13 @@ +## Code Review + +Reviewed by: , + +Reviewing code written by: + +Component: + +### Comments + + + + diff --git a/admin/F-best-u1234567.yml b/admin/F-best-u1234567.yml new file mode 100644 index 0000000..26f816e --- /dev/null +++ b/admin/F-best-u1234567.yml @@ -0,0 +1,51 @@ +# IMPORTANT: It is very important that you correctly complete this originality +# statement. +# +# This is your statement of your submitted work being your own. +# Incorrectly filling out this statement could lead to charges +# of academic misconduct. +# +# For information on how to fill this out correctly, see +# https://cs.anu.edu.au/courses/comp1110/help/faq/09-originality/ +# + +declaration: >- + I submit the work below for assessment as my best work. I declare that this + is entirely my own work, with the following documented exceptions: + +# Use this to list names of people who you collaborated with, and a +# comment about what you collaborated on. +# +# Add as many "name+comment" entries as necessary +# (or remove it altogether if you haven't collaborated with anyone) +collaboration: + - name: + comment: >- + +# Use this to list any code that you used that you did not write, +# aside from code provided by the lecturer. Provide a comment +# explaining your use and the URL to that code and the licence for +# that code +# +# Add as many "url+licence+comment" entries as necessary +# (or remove it altogether if you haven't used any external code) +code: + - comment: + url: + licence: + +# I wish to submit the following classes as entirely my own (remove this if +# you want to just submit methods): +class: + - + - + +# I wish to submit the following methods as entirely my own (remove this if +# you want to just submit classes): +method: + - + - + +# sign *your* name and uid here +name: +uid: diff --git a/admin/F-contribution.yml b/admin/F-contribution.yml new file mode 100644 index 0000000..840d72c --- /dev/null +++ b/admin/F-contribution.yml @@ -0,0 +1,28 @@ +# IMPORTANT: It is very important that you correctly complete this contribution +# statement. + +declaration: >- + Stage F represents the culmination of the entire assignment. We declare that + the work toward our submission for all stages of this assignment was + distributed among the group members as follows: + +# State your contributions as integers out of 100. The total contribution should +# be 100 or 99 (33/33/33 is fine). (Remove entries if you have fewer than three +# members). +contributions: + - uid: + contribution: + - uid: + contribution: + - uid: + contribution: + +# Sign *your* name and uids here. (Remove entries if you have fewer +# than three members) +signatures: + - name: + uid: + - name: + uid: + - name: + uid: diff --git a/admin/F-features.md b/admin/F-features.md new file mode 100644 index 0000000..4a27c1f --- /dev/null +++ b/admin/F-features.md @@ -0,0 +1,13 @@ +In addition to the features that are auto-graded, the graphical user interface +of our project implements the following features: + +*(Remove those that are unimplemented)* + + - A simple state viewer (Task 5) + - A basic playable game with some bugs (Task 14) + - A fully playable game (Task 15) + - Playable against a computer opponent / AI (Task 16) + - Generalised GUI to more than two players (Task 17) + - Generalised GUI to different sized boards (Task 17) + +additional features... diff --git a/admin/F-originality.yml b/admin/F-originality.yml new file mode 100644 index 0000000..9432656 --- /dev/null +++ b/admin/F-originality.yml @@ -0,0 +1,58 @@ +# IMPORTANT: It is very important that you correctly complete this originality +# statement. +# +# This is your statement of your submitted work being your own. +# Incorrectly filling out this statement could lead to charges +# of academic misconduct. +# +# For information on how to fill this out correctly, see +# https://cs.anu.edu.au/courses/comp1110/help/faq/09-originality/ +# + +declaration: >- + Stage F represents the culmination of the entire assignment. We declare that + everything we have submitted for for all stages of this assignment was + entirely our own work, with the following exceptions: + +# Use this to list names of people who you collaborated with, and a +# comment about what you collaborated on. +# +# Add as many "name+comment" entries as necessary +# (or remove it altogether if you haven't collaborated with anyone) +collaboration: + - name: + comment: >- + +# Use this to list any code that you used that you did not write, +# aside from code provided by the lecturer. Provide a comment +# explaining your use and the URL to that code and the licence for +# that code +# +# Add as many "url+licence+comment" entries as necessary +# (or remove it altogether if you haven't used any external code) +code: + - comment: + url: + licence: + +# Use this to list any assets (artwork, sound, etc) that you used. +# Provide a comment explaining your use of that asset and the URL +# and license for the asset +# +# Add as many "url+licence+comment" entries as necessary +# (or remove it altogether if you haven't used any external assets) +assets: + - comment: + url: + licence: + + +# Sign *your* name and uids here. (Remove entries if you have fewer +# than three members.) +signatures: + - name: + uid: + - name: + uid: + - name: + uid: diff --git a/admin/G-contribution.yml b/admin/G-contribution.yml new file mode 100644 index 0000000..1ac4365 --- /dev/null +++ b/admin/G-contribution.yml @@ -0,0 +1,26 @@ +# IMPORTANT: It is very important that you correctly complete this contribution +# statement. + +declaration: >- + We declare that the work toward our submission of Stage G was distributed among the group members as follows: + +# State your contributions as integers out of 100. The total contribution should +# be 100 or 99 (33/33/33 is fine). (Remove entries if you have fewer than three +# members). +contributions: + - uid: + contribution: + - uid: + contribution: + - uid: + contribution: + +# Sign *your* name and uids here. (Remove entries if you have fewer +# than three members) +signatures: + - name: + uid: + - name: + uid: + - name: + uid: \ No newline at end of file diff --git a/admin/G-originality.yml b/admin/G-originality.yml new file mode 100644 index 0000000..2ad33ea --- /dev/null +++ b/admin/G-originality.yml @@ -0,0 +1,58 @@ +# IMPORTANT: It is very important that you correctly complete this originality +# statement. +# +# This is your statement of your submitted work being your own. +# Incorrectly filling out this statement could lead to charges +# of academic misconduct. +# +# For information on how to fill this out correctly, see +# https://cs.anu.edu.au/courses/comp1110/help/faq/09-originality/ +# + +declaration: >- + We declare that everything we have submitted for Stage G of this assignment + and all stages before it is entirely our own work, with the following + exceptions: + +# Use this to list names of people who you collaborated with, and a +# comment about what you collaborated on. +# +# Add as many "name+comment" entries as necessary +# (or remove it altogether if you haven't collaborated with anyone) +collaboration: + - name: + comment: >- + +# Use this to list any code that you used that you did not write, +# aside from code provided by the lecturer. Provide a comment +# explaining your use and the URL to that code and the licence for +# that code +# +# Add as many "url+licence+comment" entries as necessary +# (or remove it altogether if you haven't used any external code) +code: + - comment: + url: + licence: + +# Use this to list any assets (artwork, sound, etc) that you used. +# Provide a comment explaining your use of that asset and the URL +# and license for the asset +# +# Add as many "url+licence+comment" entries as necessary +# (or remove it altogether if you haven't used any external assets) +assets: + - comment: + url: + licence: + + +# Sign *your* name and uids here. (Remove entries if you have fewer +# than three members.) +signatures: + - name: + uid: + - name: + uid: + - name: + uid: diff --git a/admin/G-presentation.yml b/admin/G-presentation.yml new file mode 100644 index 0000000..68c03b7 --- /dev/null +++ b/admin/G-presentation.yml @@ -0,0 +1,2 @@ +# use this file to record the ANU Sharepoint URL for your video presentation +url: "https://anu365-my.sharepoint.com/:v:/g/personal/u1234567_anu_edu_au/xxxx" diff --git a/admin/members.yml b/admin/members.yml new file mode 100644 index 0000000..22fc6ea --- /dev/null +++ b/admin/members.yml @@ -0,0 +1,11 @@ +# List the membership of this group. (Remove entries if you have fewer +# than three members.) +# + +members: + - name: + uid: + - name: + uid: + - name: + uid: diff --git a/admin/tasks.md b/admin/tasks.md new file mode 100644 index 0000000..6e376b8 --- /dev/null +++ b/admin/tasks.md @@ -0,0 +1,32 @@ +# COMP1110 Assignment 2 Group Tasks + +For each task or sub-task, record who is responsible, the deadline, and any dependencies. +Use the entries below as an example. + +## Week 4 + +Everyone: create application skeleton - meeting 14:00 19 Mar + +## Week 5 + +Zhang San: Task 3 isPlayerStateWellFormed - 23 Mar + +Jane Bloggs: Task 5 drawTileFromBag - 23 Mar + +Erika Mustermann: Task 6 refillFactories - 25 Mar (depends on Task 5) + +## Week 6 + +... + +## Mid-Semester Break + +## Week 7 + +## Week 8 + +## Week 9 + +## Week 10 + +## Week 11 diff --git a/assets/.gitkeep b/assets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/assets/images/blue_lagoon_board.png b/assets/images/blue_lagoon_board.png new file mode 100644 index 0000000..426a536 Binary files /dev/null and b/assets/images/blue_lagoon_board.png differ diff --git a/assets/images/blue_lagoon_box.png b/assets/images/blue_lagoon_box.png new file mode 100644 index 0000000..f779515 Binary files /dev/null and b/assets/images/blue_lagoon_box.png differ diff --git a/assets/rules/rulebook.pdf b/assets/rules/rulebook.pdf new file mode 100644 index 0000000..aeba8f1 Binary files /dev/null and b/assets/rules/rulebook.pdf differ diff --git a/comp1110-ass2.iml b/comp1110-ass2.iml new file mode 100644 index 0000000..027dad3 --- /dev/null +++ b/comp1110-ass2.iml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/comp1110/ass2/BlueLagoon.java b/src/comp1110/ass2/BlueLagoon.java new file mode 100644 index 0000000..6ac87ea --- /dev/null +++ b/src/comp1110/ass2/BlueLagoon.java @@ -0,0 +1,14 @@ +package comp1110.ass2; + +/* +This is a placeholder for the BlueLagoon class that will be provided in an +update sometime after D2B is complete. This class will contain a set of +static methods that you will need to connect to your game code. These +static methods work as an interface between our tests and your game logic. + +IMPORTANT: do not modify this file in any way. Its contents will be +overridden in an update. +*/ +public class BlueLagoon { + +} diff --git a/src/comp1110/ass2/gui/Game.java b/src/comp1110/ass2/gui/Game.java new file mode 100644 index 0000000..f5b3630 --- /dev/null +++ b/src/comp1110/ass2/gui/Game.java @@ -0,0 +1,22 @@ +package comp1110.ass2.gui; + +import javafx.application.Application; +import javafx.scene.Group; +import javafx.scene.Scene; +import javafx.stage.Stage; + +// FIXME Task 14 +// FIXME Task 15 +public class Game extends Application { + + private final Group root = new Group(); + private static final int WINDOW_WIDTH = 1200; + private static final int WINDOW_HEIGHT = 700; + + @Override + public void start(Stage stage) throws Exception { + Scene scene = new Scene(this.root, WINDOW_WIDTH, WINDOW_HEIGHT); + stage.setScene(scene); + stage.show(); + } +} diff --git a/src/comp1110/ass2/gui/Viewer.java b/src/comp1110/ass2/gui/Viewer.java new file mode 100644 index 0000000..37d9a85 --- /dev/null +++ b/src/comp1110/ass2/gui/Viewer.java @@ -0,0 +1,70 @@ +package comp1110.ass2.gui; + +import javafx.application.Application; +import javafx.event.ActionEvent; +import javafx.event.EventHandler; +import javafx.scene.Group; +import javafx.scene.Scene; +import javafx.scene.control.Button; +import javafx.scene.control.Label; +import javafx.scene.control.TextField; +import javafx.scene.layout.HBox; +import javafx.stage.Stage; + +public class Viewer extends Application { + + private static final int VIEWER_WIDTH = 1200; + private static final int VIEWER_HEIGHT = 700; + + private final Group root = new Group(); + private final Group controls = new Group(); + private TextField stateTextField; + + + /** + * Given a state string, draw a representation of the state + * on the screen. + *

+ * This may prove useful for debugging complex states. + * + * @param stateString a string representing a game state + */ + void displayState(String stateString) { + // FIXME Task 5 + } + + /** + * Create a basic text field for input and a refresh button. + */ + private void makeControls() { + Label playerLabel = new Label("Game State:"); + stateTextField = new TextField(); + stateTextField.setPrefWidth(200); + Button button = new Button("Refresh"); + button.setOnAction(new EventHandler() { + @Override + public void handle(ActionEvent e) { + displayState(stateTextField.getText()); + } + }); + HBox hb = new HBox(); + hb.getChildren().addAll(playerLabel, stateTextField, button); + hb.setSpacing(10); + hb.setLayoutX(50); + hb.setLayoutY(VIEWER_HEIGHT - 50); + controls.getChildren().add(hb); + } + + @Override + public void start(Stage primaryStage) throws Exception { + primaryStage.setTitle("Blue Lagoon Viewer"); + Scene scene = new Scene(root, VIEWER_WIDTH, VIEWER_HEIGHT); + + root.getChildren().add(controls); + + makeControls(); + + primaryStage.setScene(scene); + primaryStage.show(); + } +} diff --git a/tests/comp1110/ass2/.gitkeep b/tests/comp1110/ass2/.gitkeep new file mode 100644 index 0000000..e69de29