Skip to content
This repository was archived by the owner on Nov 8, 2021. It is now read-only.

Commit e2a4c6f

Browse files
authored
Merge pull request #1 from sagelga/develop
Release v1.0
2 parents 1fd7b3a + f8a0483 commit e2a4c6f

645 files changed

Lines changed: 46833 additions & 126 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
## Java
22

3+
core/assets/generated/
4+
5+
*.dot
36
*.class
47
*.war
58
*.ear

.gitlab-ci.yml

Lines changed: 70 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,98 @@
11
image: java:1.8.0-jdk
22

33
stages:
4+
- prepare
5+
- track
46
- check
57
- build
6-
- test
7-
- export
8+
- run
89

9-
before_script:
10-
# - echo `pwd` # debug
11-
# - echo "$CI_BUILD_NAME, $CI_BUILD_REF_NAME $CI_BUILD_STAGE" # debug
12-
# - export GRADLE_USER_HOME=`pwd`/.gradle
13-
14-
version-checker:
15-
stage: check
10+
java-version:
11+
stage: prepare
1612
script:
1713
# Checking Java version + Directories
14+
- readlink -f $(which java)
1815
- java -version
19-
- echo $JAVA_HOME
16+
retry: 1
17+
only:
18+
- develop
2019

20+
gradle-version:
21+
stage: prepare
22+
script:
2123
# Checking Gradle version
2224
- gradle -version
2325
retry: 1
26+
only:
27+
- develop
2428

25-
dependency-checker:
26-
stage: check
29+
set-paths:
30+
stage: prepare
31+
script:
32+
# Setting JAVA and Gradle to the default path
33+
- export PATH=$PATH:/opt/gradle/gradle-4.2.1/bin
34+
- export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre
35+
- export PATH=$PATH:/usr/lib/jvm/java-8-openjdk-amd64/jre/bin
36+
only:
37+
- develop
38+
39+
code-count:
40+
stage: track
2741
script:
28-
# Gradle check for correct dependency imports
29-
- gradle check
42+
- ls -las
43+
#
44+
# Calculate .java count
45+
- echo '|Lines |Words |Chars' > java_tracker.txt
46+
- git ls-files | grep "\(.java\)$" | xargs wc -cwl
47+
- git ls-files | grep "\(.java\)$" | xargs wc -cwl >> java_tracker.txt
48+
#
49+
# Calculate with coverage
50+
- cloc core
51+
- cloc core > adv_java_tracker.txt
52+
- cloc desktop
53+
- cloc desktop >> adv_java_tracker.txt
54+
- cloc . --by-file-by-lang
55+
- cloc . --by-file-by-lang > all_adv_java_tracker.txt
56+
#
57+
# Calculate .gradle count
58+
#- echo '|Lines |Words |Chars' > gradle_tracker.txt
59+
- git ls-files | grep "\(.gradle\)$" | xargs wc -cwl
60+
#- git ls-files | grep "\(.gradle\)$" | xargs wc -cwl >> gradle_tracker.txt
61+
#
62+
# Lists all assets
63+
- git ls-files > assets_list.txt
64+
#
65+
# Keep the development graph line
66+
- git log --graph --full-history --all --color --pretty=format:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s"
67+
#- git log --graph --full-history --all --pretty=format:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s" > logs.txt
68+
#
69+
# Check directory again
70+
- mkdir trackers
71+
- mv *.txt trackers/
72+
- ls -las
73+
artifacts:
74+
expire_in: 30 day
75+
paths:
76+
- trackers
77+
allow_failure: true
78+
retry: 1
79+
only:
80+
- develop
81+
- master
3082

3183
gradle-tasks:
3284
stage: check
3385
script:
3486
# Gives out lists of Gradle Tasks
3587
- gradle -q tasks
88+
retry: 1
3689

3790
gradle-clean:
3891
stage: check
3992
script:
4093
# Deletes previous build cache
4194
- gradle clean
95+
retry: 1
4296

4397
build-game:
4498
stage: build
@@ -47,18 +101,8 @@ build-game:
47101
- gradle assemble
48102

49103
run-game:
50-
stage: test
104+
stage: run
51105
script:
52106
# Do gradle check and gradle assemble
53107
- gradle run
54-
55-
#export-game:
56-
# stage: export
57-
# script:
58-
# - gradle fatJar
59-
# artifacts:
60-
# paths:
61-
# - $project/build/libs/
62-
# expire_in: 5 day
63-
# allow_failure: true
64-
# retry: 1
108+
retry: 1

CODE_OF_CONDUCT.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to creating a positive environment include:
10+
11+
* Using welcoming and inclusive language
12+
* Being respectful of differing viewpoints and experiences
13+
* Gracefully accepting constructive criticism
14+
* Focusing on what is best for the community
15+
* Showing empathy towards other community members
16+
17+
Examples of unacceptable behavior by participants include:
18+
19+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
* Trolling, insulting/derogatory comments, and personal or political attacks
21+
* Public or private harassment
22+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
* Other conduct which could reasonably be considered inappropriate in a professional setting
24+
25+
## Our Responsibilities
26+
27+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28+
29+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
## Scope
32+
33+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34+
35+
## Enforcement
36+
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at 59070022@kmitl.ac.th. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38+
39+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40+
41+
## Attribution
42+
43+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44+
45+
[homepage]: http://contributor-covenant.org
46+
[version]: http://contributor-covenant.org/version/1/4/

Documentation.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# โครงงานพัฒนาเกม TrashMelody ด้วยหลักการโปรแกรมเชิงวัตถุ
2+
3+
# จัดทำโดย
4+
5+
1. นายกวิน เรืองประทีปแสง 59070009
6+
2. นายคุณานนต์ ศรีสันติโรจน์ 59070022
7+
3. นยฐิติพัฒน์ วรรัตน์ 59070043
8+
4. นายนาธาร เยี่ยงศุภพานนทร์ 59070087
9+
5. นางสาวอภิชญา ค้ำโพธิ์ 59070186
10+
11+
# เสนอ
12+
ผศ. ดร. มานพ พันธุ์โคกกรวด
13+
ผศ. ดร. ธนิศา นุ่มนนท์
14+
15+
รายงานนี้เป็นส่วนหนึ่งของการศึกษาวิชา การพัฒนาโปรแกรมเชิงอ็อบเจกต์ (06016211)
16+
สถาบันเทคโนโลยีพระจอมเกล้าเจ้าคุณทหารลาดกระบัง
17+
ภาคเรียนที่ 1 ปีการศึกษา 2560
18+
19+
# ที่มาของเกม
20+
ทีมพัฒนาต้องการสร้างเกมที่สามารถสอดแทรกความรู้แก่ผู้เล่นไปพร้อมๆ กันอย่างแนบเนียนได้ จึงเกิดออกมาเป็นเกมแยกขยะ ที่ผู้เล่นจะต้องกดปุ่มตามจังหวะของเพลง และจะต้องกดปุ่มให้ถูกต้องกับประเภทของขยะที่ปรรากฏออกมาบนหน้าจอ
21+
22+
# เนื้อเรื่องของเกม
23+
เมื่อเมืองเต็มไปด้วยขยะ คุณผู้ได้รับหน้าที่อาสาสมัครคัดแยกขยะจึงต้องมาช่วยแยกขยะลงไปในถังขยะให้ถูกต้อง ไม่ว่าจะเป็นขยะทั่วไป ขยะเปียก ขยะรีไซเคิล และขยะอันตราย เมื่อเปิดเกมขึ้นมา ผู้เล่นจะได้เลือกแผนที่ที่จะเล่น แต่ละสถานที่ก็จะมีขยะแตกต่างกันไป เช่น คอนโดฯ ตลาด เป็นต้น ในการเล่นเกม ผู้เล่นจะต้องกดปุ่มเพื่อให้ขยะที่ไหลลงมาตามสายพานถูกจัดไปอยู่ในถังขยะที่ถูกต้อง หากผู้เล่นไม่รู้ว่าขยะใดจะต้องไปอยู่กับถังใด ก็สามารถเปิดดูได้ว่า ขยะประเภทนี้เป็นประเภทอะไร โดยแต่ละด่านก็จะมีเวลาจำกัดแตกต่างกันไป และคะแนนที่คุณจะได้ขึ้นอยู่กับความถูกต้องของขยะที่หล่นไปในถัง หากคัดแยกไม่ถูกต้อง หรือขยะหล่นจากสายพานไปก่อน ก็จะโดนทำโทษโดยการหักคะแนน
24+
25+
ผู้เล่นจะสะสมคะแนนไปเรื่อยๆ เพื่อปลดล็อคด่านต่อไป และในเกมก็มีคอลเลกชันสำหรับสะสมขยะที่ได้เก็บมาแล้วด้วย ยิ่งเล่นไปเรื่อยๆ ก็จะได้เจอขยะชนิดใหม่ๆ ให้สะสมลงในคอลเลกชันมากขึ้น
26+
27+
ความยากจะเพื่มขื้นเรื่อยๆ ตามระดับของด่าน โดยที่จะมีประเภทขยะ และการหักคะแนนที่มากขื้นเพื่อเป็นการปรับความยากง่ายให้กับเกมส์ หากว่าผู้เล่นไม่สามารถทำตามเป้าหมายของเกมส์ได้ (เช่นแยกขยะให้ถูกต้องอย่างน้อย 80%) ก็จะถือว่าเล่นด่านนั้นๆ ไม่ผ่าน
28+
29+
# การสืบทอดของคลาส
30+
ผู้ที่ต้องการดูการสืบทอดคลาสทั้งหมด สามารถเข้าไปดูได้บน PDF
2.66 MB
Binary file not shown.

0 commit comments

Comments
 (0)