This repository has been archived by the owner on Apr 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from DonatJR/develop
'finished' state
- Loading branch information
Showing
54 changed files
with
2,310 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,4 +43,4 @@ project/.sbtserver | |
.sonar/ | ||
|
||
# Application | ||
yourgame.log | ||
learn-duel.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
language: scala | ||
|
||
scala: | ||
- 2.12.4 | ||
|
||
script: | ||
- sbt clean coverage test coverageReport | ||
after_success: | ||
- sbt coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,16 @@ | ||
# Htwg Scala Seed Project | ||
===================================================== | ||
## the easiest way to start a project for the lecture SE | ||
# Learn Duel [![Build Status](https://travis-ci.org/DonatJR/learn-duel.svg?branch=develop)](https://travis-ci.org/DonatJR/learn-duel) [![Coverage Status](https://coveralls.io/repos/github/DonatJR/learn-duel/badge.svg?branch=develop)](https://coveralls.io/github/DonatJR/learn-duel?branch=develop) | ||
|
||
## About | ||
Learn Duel is based on QuizDuel and works in a similar fashion, but with a new twist: | ||
You play with questions based on your school or study assignments. | ||
|
||
This is a seed project to create a basic scala project as used in the | ||
class Software Engineering at the University of Applied Science HTWG Konstanz. | ||
|
||
It requires Java 8 on your local platform. | ||
The project has | ||
* a folder structure prepared for a MVC-style application | ||
* *ScalaTest* and as dependency aswell as dependencies to other libraries in the build.sbt (commented out at start). | ||
* *scalastyle-sbt-plugin* and *sbt-scoverage* sbt plugins | ||
* .gitignore defaults | ||
|
||
The easiest way to create your own project from this seed is | ||
* create an account on github | ||
* navigate to this project on github (https://github.com/markoboger/htwg-scala-seed) | ||
* fork this project on github (button on top right "Fork") | ||
* copy the URL to your fork | ||
* clone the forked project from your local git (git clone <URL>) or IDE (IDEA: File > New > Import from Version Controll > github) | ||
|
||
After that, please rename | ||
* the Project name from htwg-scala-seed to <your game name> | ||
* the the package structure from de.htwg.se.yourgame to de.htwg.se.<your game name> | ||
* the name of the project in the build.sbt file from htwg-scala-seed to <your game name> | ||
* the main Class YourGame to <YourGameName> | ||
|
||
Then | ||
* push to git | ||
* add team partner to your project on github (Settings > Collaborators) | ||
* clone on partners account | ||
* push and pull back and forth | ||
## Current features | ||
For now, there is only local play, but online features will be added later. | ||
If you are playing alone, the answers can be selected with the mouse or the keys 1-4. | ||
In local multiplayer mode player 1 can specify his answer with the keys 1-4 and | ||
player 2 with the keys 6-9. | ||
|
||
|
||
## Future features: | ||
- define your own questions | ||
- play with up to 3 friends online and compete against each other |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<configuration> | ||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder> | ||
<pattern>%msg%n</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<appender name="FILE" class="ch.qos.logback.core.FileAppender"> | ||
<!-- path to your log file, where you want to store logs --> | ||
<file>learn-duel.log</file> | ||
<append>false</append> | ||
<encoder> | ||
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<root level="debug"> | ||
<appender-ref ref="STDOUT" /> | ||
<appender-ref ref="FILE" /> | ||
</root> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
[ | ||
{ | ||
"id": 1, | ||
"text": "What is 1+1?", | ||
"points": 20, | ||
"answers": [ | ||
{ | ||
"id": 1, | ||
"text": "1" | ||
}, | ||
{ | ||
"id": 2, | ||
"text": "2" | ||
}, | ||
{ | ||
"id": 3, | ||
"text": "3" | ||
}, | ||
{ | ||
"id": 4, | ||
"text": "4" | ||
} | ||
], | ||
"correctAnswer": 2, | ||
"time": 60 | ||
}, | ||
{ | ||
"id": 2, | ||
"text": "What is 5*20?", | ||
"points": 50, | ||
"answers": [ | ||
{ | ||
"id": 1, | ||
"text": "168" | ||
}, | ||
{ | ||
"id": 2, | ||
"text": "934" | ||
}, | ||
{ | ||
"id": 3, | ||
"text": "236" | ||
}, | ||
{ | ||
"id": 4, | ||
"text": "100" | ||
} | ||
], | ||
"correctAnswer": 4, | ||
"time": 60 | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,196 @@ | ||
/* @import url('https://fonts.googleapis.com/css?family=Roboto:100,300,400,700'); */ | ||
|
||
.headline { | ||
-fx-font-size: 36px; | ||
-fx-font-family: 'Roboto', sans-serif | ||
} | ||
|
||
/* ============================================ */ | ||
/* MENU */ | ||
/* ============================================ */ | ||
|
||
.menu { | ||
background-color: #fff; | ||
-fx-font-family: 'Roboto', sans-serif; | ||
-fx-alignment: center; | ||
-fx-spacing: 50px; | ||
} | ||
|
||
.play-button { | ||
-fx-text-fill: #fff; | ||
-fx-min-width: 430px; | ||
-fx-min-height: 60px; | ||
-fx-background-color: #259A40; | ||
-fx-cursor: hand; | ||
} | ||
|
||
.play-button:hover { | ||
-fx-background-color: #1e7e34; | ||
} | ||
|
||
.player-rows-container { | ||
-fx-spacing: 10px; | ||
} | ||
|
||
.player-container { | ||
-fx-alignment: center; | ||
-fx-spacing: 10px; | ||
} | ||
|
||
.player-textfield { | ||
-fx-min-width: 360px; | ||
-fx-min-height: 30px; | ||
-fx-faint-focus-color: transparent; | ||
-fx-focus-color: gray; | ||
} | ||
|
||
.player-textfield-non-editable { | ||
-fx-focus-color: rgb(221,221,221); | ||
-fx-background-color: rgb(221,221,221); | ||
} | ||
|
||
.add-remove-buttons { | ||
-fx-min-width: 60px; | ||
-fx-min-height: 30px; | ||
-fx-background-color: rgb(221,221,221); | ||
-fx-cursor: hand; | ||
} | ||
|
||
.help-button { | ||
-fx-min-width: 430px; | ||
-fx-min-height: 30px; | ||
-fx-background-color: rgb(221,221,221); | ||
-fx-cursor: hand; | ||
} | ||
|
||
.add-remove-buttons:hover, .help-button:hover { | ||
-fx-background-color: lightgray; | ||
} | ||
|
||
/* ============================================ */ | ||
/* GAME */ | ||
/* ============================================ */ | ||
|
||
.game { | ||
-fx-background-color: #fff; | ||
-fx-font-family: 'Roboto', sans-serif; | ||
-fx-alignment: center; | ||
-fx-spacing: 50px; | ||
} | ||
|
||
.answer-container { | ||
-fx-alignment: center; | ||
-fx-spacing: 10px; | ||
} | ||
|
||
.answer-button { | ||
-fx-min-width: 430px; | ||
-fx-min-height: 50px; | ||
-fx-background-color: rgb(221,221,221); | ||
-fx-cursor: hand; | ||
} | ||
|
||
.answer-button:hover { | ||
-fx-background-color: lightgray; | ||
} | ||
|
||
.remaining-time { | ||
-fx-font-family: 'Roboto', sans-serif; | ||
-fx-font-size: 20px; | ||
} | ||
|
||
/* ============================================ */ | ||
/* RESULT */ | ||
/* ============================================ */ | ||
|
||
.result { | ||
-fx-background-color: #fff; | ||
-fx-font-family: 'Roboto', sans-serif; | ||
-fx-alignment: center; | ||
-fx-spacing: 50px; | ||
} | ||
|
||
.player-results { | ||
-fx-alignment: center; | ||
-fx-spacing: 35px; | ||
} | ||
|
||
.player-result { | ||
-fx-alignment: center; | ||
-fx-spacing: 20px; | ||
} | ||
|
||
.player-name { | ||
-fx-font-size: 20px; | ||
} | ||
|
||
.player-points { | ||
-fx-font-size: 12px; | ||
-fx-font-weight: bold; | ||
} | ||
|
||
.correct-container { | ||
-fx-alignment: center; | ||
} | ||
|
||
.correct-text { | ||
-fx-font-size: 14px; | ||
-fx-fill: #28a745; | ||
} | ||
|
||
.correct-answer { } | ||
|
||
.wrong-container { | ||
-fx-alignment: center; | ||
} | ||
|
||
.wrong-text { | ||
-fx-font-size: 14px; | ||
-fx-fill: #d43f3a; | ||
} | ||
|
||
.wrong-answer {} | ||
|
||
.winner { | ||
-fx-font-size: 14px; | ||
} | ||
|
||
.back-button { | ||
-fx-min-width: 430px; | ||
-fx-min-height: 50px; | ||
-fx-background-color: rgb(221,221,221); | ||
-fx-cursor: hand; | ||
} | ||
|
||
.back-button:hover { | ||
-fx-background-color: lightgray; | ||
} | ||
|
||
/* ============================================ */ | ||
/* HELP */ | ||
/* ============================================ */ | ||
|
||
.dialog-pane { | ||
-fx-background-color: white; | ||
} | ||
|
||
.dialog-pane > .content { | ||
-fx-background-color: white; | ||
-fx-background-insets: 10px 20px; | ||
-fx-padding: 10px 20px; | ||
} | ||
|
||
.dialog-pane > .button-bar > .container { | ||
-fx-background-color: white; | ||
} | ||
|
||
.dialog-pane > .button-bar > .container > .button { | ||
-fx-min-width: 430px; | ||
-fx-min-height: 30px; | ||
-fx-background-color: rgb(221,221,221); | ||
-fx-cursor: hand; | ||
} | ||
|
||
.dialog-pane > .button-bar > .container > .button:hover { | ||
-fx-background-color: lightgray; | ||
} |
Oops, something went wrong.