Initial add

This commit is contained in:
Paul Scott 2023-03-13 20:34:59 +11:00
commit b1a8ce7352
37 changed files with 1310 additions and 0 deletions

22
.gitignore vendored Normal file
View File

@ -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

49
.gitlab-ci.yml Normal file
View File

@ -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:

92
.idea/jsonSchemas.xml Normal file
View File

@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JsonSchemaMappingsProjectConfiguration">
<state>
<map>
<entry key="Best">
<value>
<SchemaInfo>
<option name="name" value="Best" />
<option name="relativePathToSchema" value="https://cs.anu.edu.au/courses/comp1110/schemas/best.json" />
<option name="patterns">
<list>
<Item>
<option name="pattern" value="true" />
<option name="path" value="admin/*-best-*.yml" />
<option name="mappingKind" value="Pattern" />
</Item>
</list>
</option>
</SchemaInfo>
</value>
</entry>
<entry key="Contribution">
<value>
<SchemaInfo>
<option name="name" value="Contribution" />
<option name="relativePathToSchema" value="https://cs.anu.edu.au/courses/comp1110/schemas/contribution.json" />
<option name="patterns">
<list>
<Item>
<option name="pattern" value="true" />
<option name="path" value="admin/*-contribution.yml" />
<option name="mappingKind" value="Pattern" />
</Item>
</list>
</option>
</SchemaInfo>
</value>
</entry>
<entry key="Group Members">
<value>
<SchemaInfo>
<option name="name" value="Group Members" />
<option name="relativePathToSchema" value="https://cs.anu.edu.au/courses/comp1110/schemas/members.json" />
<option name="patterns">
<list>
<Item>
<option name="path" value="admin/members.yml" />
</Item>
</list>
</option>
</SchemaInfo>
</value>
</entry>
<entry key="Originality">
<value>
<SchemaInfo>
<option name="name" value="Originality" />
<option name="relativePathToSchema" value="https://cs.anu.edu.au/courses/comp1110/schemas/originality-group.json" />
<option name="patterns">
<list>
<Item>
<option name="pattern" value="true" />
<option name="path" value="admin/*-originality.yml" />
<option name="mappingKind" value="Pattern" />
</Item>
</list>
</option>
</SchemaInfo>
</value>
</entry>
<entry key="Presentation">
<value>
<SchemaInfo>
<option name="name" value="Presentation" />
<option name="relativePathToSchema" value="https://cs.anu.edu.au/courses/comp1110/schemas/presentation.json" />
<option name="patterns">
<list>
<Item>
<option name="pattern" value="true" />
<option name="path" value="admin/*-presentation.yml" />
<option name="mappingKind" value="Pattern" />
</Item>
</list>
</option>
</SchemaInfo>
</value>
</entry>
</map>
</state>
</component>
</project>

View File

@ -0,0 +1,17 @@
<component name="libraryTable">
<library name="JUnit5" type="repository">
<properties maven-id="org.junit.jupiter:junit-jupiter:5.7.0" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter/5.7.0/junit-jupiter-5.7.0.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter-api/5.7.0/junit-jupiter-api-5.7.0.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/apiguardian/apiguardian-api/1.1.0/apiguardian-api-1.1.0.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/junit/platform/junit-platform-commons/1.7.0/junit-platform-commons-1.7.0.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter-params/5.7.0/junit-jupiter-params-5.7.0.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter-engine/5.7.0/junit-jupiter-engine-5.7.0.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/junit/platform/junit-platform-engine/1.7.0/junit-platform-engine-1.7.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="javafx">
<CLASSES>
<root url="file://$PATH_TO_FX$" />
</CLASSES>
<JAVADOC />
<NATIVE>
<root url="file://$PATH_TO_FX$" />
</NATIVE>
<SOURCES />
<jarDirectory url="file://$PATH_TO_FX$" recursive="false" />
</library>
</component>

6
.idea/misc.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/comp1110-ass2.iml" filepath="$PROJECT_DIR$/comp1110-ass2.iml" />
</modules>
</component>
</project>

View File

@ -0,0 +1,16 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Game" type="Application" factoryName="Application" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="comp1110.ass2.gui.Game" />
<module name="comp1110-ass2" />
<option name="VM_PARAMETERS" value="--module-path ${PATH_TO_FX} --add-modules javafx.controls,javafx.fxml" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="comp1110.ass2.gui.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,16 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Viewer" type="Application" factoryName="Application" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="comp1110.ass2.gui.Viewer" />
<module name="comp1110-ass2" />
<option name="VM_PARAMETERS" value="--module-path ${PATH_TO_FX} --add-modules javafx.controls,javafx.fxml" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="comp1110.ass2.gui.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>

294
README.md Normal file
View File

@ -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.
<img src="assets/images/blue_lagoon_board.png" alt="Blue Lagoon Game Board" width=50% height=50%>
### 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.

26
admin/B-contribution.yml Normal file
View File

@ -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:

58
admin/B-originality.yml Normal file
View File

@ -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:

51
admin/C-best-u1234567.yml Normal file
View File

@ -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:

26
admin/C-contribution.yml Normal file
View File

@ -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:

58
admin/C-originality.yml Normal file
View File

@ -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:

View File

@ -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:

26
admin/E-contribution.yml Normal file
View File

@ -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:

58
admin/E-originality.yml Normal file
View File

@ -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:

View File

@ -0,0 +1,13 @@
## Code Review
Reviewed by: <your full name>, <your uid>
Reviewing code written by: <the other person's full name> <other uid>
Component: <the component being reviewed>
### Comments
<write your comments here>

51
admin/F-best-u1234567.yml Normal file
View File

@ -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:

28
admin/F-contribution.yml Normal file
View File

@ -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:

13
admin/F-features.md Normal file
View File

@ -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...

58
admin/F-originality.yml Normal file
View File

@ -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:

26
admin/G-contribution.yml Normal file
View File

@ -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:

58
admin/G-originality.yml Normal file
View File

@ -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:

2
admin/G-presentation.yml Normal file
View File

@ -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"

11
admin/members.yml Normal file
View File

@ -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:

32
admin/tasks.md Normal file
View File

@ -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

0
assets/.gitkeep Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

BIN
assets/rules/rulebook.pdf Normal file

Binary file not shown.

24
comp1110-ass2.iml Normal file
View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src-dev" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="javafx" level="project" />
<orderEntry type="library" scope="TEST" name="JUnit5" level="project" />
<orderEntry type="module-library" scope="TEST">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/comp1110-ass2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
</module>

View File

@ -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 {
}

View File

@ -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();
}
}

View File

@ -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.
* <p>
* 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<ActionEvent>() {
@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();
}
}

View File