Richard Halsall 2 years ago
parent
commit
8caed94855
  1. 1
      .gitignore
  2. 5
      kniffel/inc/errechneChance.js
  3. 6
      kniffel/inc/sortiereWuerfelaufsteigend.js
  4. 1
      kniffel/index.html
  5. 9
      kniffel/test/test_checkeBonus.test.js
  6. 14
      kniffel/test/test_errechneChance.test.js
  7. 20
      kniffel/test/test_sortiereWuerfelaufsteigend.test.js
  8. 4
      plugins.js
  9. 44
      uno/css/uno.css
  10. BIN
      uno/img/cards/BLUE/+2.png
  11. BIN
      uno/img/cards/BLUE/0.png
  12. BIN
      uno/img/cards/BLUE/1.png
  13. BIN
      uno/img/cards/BLUE/2.png
  14. BIN
      uno/img/cards/BLUE/3.png
  15. BIN
      uno/img/cards/BLUE/4.png
  16. BIN
      uno/img/cards/BLUE/5.png
  17. BIN
      uno/img/cards/BLUE/6.png
  18. BIN
      uno/img/cards/BLUE/7.png
  19. BIN
      uno/img/cards/BLUE/8.png
  20. BIN
      uno/img/cards/BLUE/9.png
  21. BIN
      uno/img/cards/BLUE/A.png
  22. BIN
      uno/img/cards/BLUE/R.png
  23. BIN
      uno/img/cards/GREEN/+2.png
  24. BIN
      uno/img/cards/GREEN/0.png
  25. BIN
      uno/img/cards/GREEN/1.png
  26. BIN
      uno/img/cards/GREEN/2.png
  27. BIN
      uno/img/cards/GREEN/3.png
  28. BIN
      uno/img/cards/GREEN/4.png
  29. BIN
      uno/img/cards/GREEN/5.png
  30. BIN
      uno/img/cards/GREEN/6.png
  31. BIN
      uno/img/cards/GREEN/7.png
  32. BIN
      uno/img/cards/GREEN/8.png
  33. BIN
      uno/img/cards/GREEN/9.png
  34. BIN
      uno/img/cards/GREEN/A.png
  35. BIN
      uno/img/cards/GREEN/R.png
  36. BIN
      uno/img/cards/NONE/+4.png
  37. BIN
      uno/img/cards/NONE/CC.png
  38. BIN
      uno/img/cards/RED/+2.png
  39. BIN
      uno/img/cards/RED/0.png
  40. BIN
      uno/img/cards/RED/1.png
  41. BIN
      uno/img/cards/RED/2.png
  42. BIN
      uno/img/cards/RED/3.png
  43. BIN
      uno/img/cards/RED/4.png
  44. BIN
      uno/img/cards/RED/5.png
  45. BIN
      uno/img/cards/RED/6.png
  46. BIN
      uno/img/cards/RED/7.png
  47. BIN
      uno/img/cards/RED/8.png
  48. BIN
      uno/img/cards/RED/9.png
  49. BIN
      uno/img/cards/RED/A.png
  50. BIN
      uno/img/cards/RED/R.png
  51. BIN
      uno/img/cards/YELLOW/+2.png
  52. BIN
      uno/img/cards/YELLOW/0.png
  53. BIN
      uno/img/cards/YELLOW/1.png
  54. BIN
      uno/img/cards/YELLOW/2.png
  55. BIN
      uno/img/cards/YELLOW/3.png
  56. BIN
      uno/img/cards/YELLOW/4.png
  57. BIN
      uno/img/cards/YELLOW/5.png
  58. BIN
      uno/img/cards/YELLOW/6.png
  59. BIN
      uno/img/cards/YELLOW/7.png
  60. BIN
      uno/img/cards/YELLOW/8.png
  61. BIN
      uno/img/cards/YELLOW/9.png
  62. BIN
      uno/img/cards/YELLOW/A.png
  63. BIN
      uno/img/cards/YELLOW/R.png
  64. BIN
      uno/img/stackCards/BLUE/+2.png
  65. BIN
      uno/img/stackCards/BLUE/+4.png
  66. BIN
      uno/img/stackCards/BLUE/0.png
  67. BIN
      uno/img/stackCards/BLUE/1.png
  68. BIN
      uno/img/stackCards/BLUE/2.png
  69. BIN
      uno/img/stackCards/BLUE/3.png
  70. BIN
      uno/img/stackCards/BLUE/4.png
  71. BIN
      uno/img/stackCards/BLUE/5.png
  72. BIN
      uno/img/stackCards/BLUE/6.png
  73. BIN
      uno/img/stackCards/BLUE/7.png
  74. BIN
      uno/img/stackCards/BLUE/8.png
  75. BIN
      uno/img/stackCards/BLUE/9.png
  76. BIN
      uno/img/stackCards/BLUE/CC.png
  77. BIN
      uno/img/stackCards/BLUE/R.png
  78. BIN
      uno/img/stackCards/BLUE/S.png
  79. BIN
      uno/img/stackCards/FirstDrawCard.png
  80. BIN
      uno/img/stackCards/GREEN/+2.png
  81. BIN
      uno/img/stackCards/GREEN/+4.png
  82. BIN
      uno/img/stackCards/GREEN/0.png
  83. BIN
      uno/img/stackCards/GREEN/1.png
  84. BIN
      uno/img/stackCards/GREEN/2.png
  85. BIN
      uno/img/stackCards/GREEN/3.png
  86. BIN
      uno/img/stackCards/GREEN/4.png
  87. BIN
      uno/img/stackCards/GREEN/5.png
  88. BIN
      uno/img/stackCards/GREEN/6.png
  89. BIN
      uno/img/stackCards/GREEN/7.png
  90. BIN
      uno/img/stackCards/GREEN/8.png
  91. BIN
      uno/img/stackCards/GREEN/9.png
  92. BIN
      uno/img/stackCards/GREEN/CC.png
  93. BIN
      uno/img/stackCards/GREEN/R.png
  94. BIN
      uno/img/stackCards/GREEN/S.png
  95. BIN
      uno/img/stackCards/NONE/+4.png
  96. BIN
      uno/img/stackCards/NONE/CC.png
  97. BIN
      uno/img/stackCards/RED/+2.png
  98. BIN
      uno/img/stackCards/RED/+4.png
  99. BIN
      uno/img/stackCards/RED/0.png
  100. BIN
      uno/img/stackCards/RED/1.png

1
.gitignore

@ -1 +1,2 @@
/node_modules/
/commits

5
kniffel/inc/errechneChance.js

@ -0,0 +1,5 @@
function errechneChance(w1, w2, w3, w4, w5){
return w1 + w2 + w3 + w4 + w5;
}
module.exports = errechneChance;

6
kniffel/inc/sortiereWuerfelaufsteigend.js

@ -0,0 +1,6 @@
function sortiereWuerfelaufsteigend(wuerfelArr){
return wuerfelArr.sort();
}
module.exports = sortiereWuerfelaufsteigend;

1
kniffel/index.html

@ -7,7 +7,6 @@
<script type="text/javascript" src="inc/sammleGleicheZahlen.js"></script>
<script type="text/javascript" src="inc/helper.js"></script>
<script type="text/javascript" src="inc/summeObererTeil.js"></script>
<script type="text/javascript" src="inc/checkeBonus.js"></script>
<title>Kniffel</title>
</head>
<body>

9
kniffel/test/test_checkeBonus.test.js

@ -5,11 +5,18 @@ const checkeBonus = require('../inc/checkeBonus');
describe('tests kniffel', () => {
//Ein Test mit Name und Funktion
it('teste Bonus Kniffel oberer Teil', ()=>{
it('teste Bonus Kniffel oberer Teil auf obere Wertgrenze', ()=>{
//Vergleiche Ist- und Sollergebnis
expect(checkeBonus(65)).toBe(100);
});
it('teste Bonus Kniffel oberer Teil auf untere Wertgrenze', ()=>{
//Vergleiche Ist- und Sollergebnis
expect(checkeBonus(64)).toBe(64);
});
})

14
kniffel/test/test_errechneChance.test.js

@ -0,0 +1,14 @@
const errechneChance = require('../inc/errechneChance');
//Eine Test Gruppe, mit mehreren Tests
describe('tests kniffel', () => {
it('teste Chance fuer unteren Teil von Kniffel mit fuenf uebergebenen Wuerfeln', ()=>{
//Vergleiche Ist- und Sollergebnis
expect(errechneChance(3, 4, 6, 1, 2)).toBe(16);
});
})

20
kniffel/test/test_sortiereWuerfelaufsteigend.test.js

@ -0,0 +1,20 @@
const sortiereWuerfelaufsteigend = require('../inc/sortiereWuerfelaufsteigend');
//Eine Test Gruppe, mit mehreren Tests
describe('tests kniffel', () => {
it('teste aufsteigende Sortierung fuer große Straße', ()=>{
//Vergleiche Ist- und Sollergebnis
expect(sortiereWuerfelaufsteigend(['3', '5', '4', '2', '1'])).toContain('1', '2', '3', '4', '5');
});
it('teste aufsteigende Sortierung fuer kleine Straße', ()=>{
//Vergleiche Ist- und Sollergebnis
expect(sortiereWuerfelaufsteigend(['2', '3', '5', '2', '4'])).toContain('2', '3', '4', '5');
});
})

4
plugins.js
File diff suppressed because it is too large
View File

44
uno/css/uno.css

@ -0,0 +1,44 @@
@import url('https://fonts.googleapis.com/css2?family=Cabin:wght@600;700&display=swap');
*{
font-family: 'Cabin', sans-serif;
}
body
{
overflow: hidden;
}
/* ### Stapel-"Karte ziehen" ### */
.stack-draw
{
max-width: 25vh;
min-width: 20vh;
position: absolute;
top: 47vh;
right: min(90%, (53% + 10vh));
transform: translate(50%, -50%);
}
/* ### Stapel-"Karte legen" ### */
.stack-put
{
max-width: 25vh;
min-width: 20vh;
position: absolute;
top: 47vh;
left: min(90%, (53% + 10vh));
transform: translate(-50%, -50%);
}
#first-put-anim
{
top: 30vh;
opacity: 0;
}
#first-put
{
opacity: 0;
}

BIN
uno/img/cards/BLUE/+2.png

After

Width: 240  |  Height: 360  |  Size: 12 KiB

BIN
uno/img/cards/BLUE/0.png

After

Width: 240  |  Height: 360  |  Size: 14 KiB

BIN
uno/img/cards/BLUE/1.png

After

Width: 240  |  Height: 360  |  Size: 10 KiB

BIN
uno/img/cards/BLUE/2.png

After

Width: 240  |  Height: 360  |  Size: 11 KiB

BIN
uno/img/cards/BLUE/3.png

After

Width: 240  |  Height: 360  |  Size: 737 KiB

BIN
uno/img/cards/BLUE/4.png

After

Width: 240  |  Height: 360  |  Size: 9.6 KiB

BIN
uno/img/cards/BLUE/5.png

After

Width: 240  |  Height: 360  |  Size: 10 KiB

BIN
uno/img/cards/BLUE/6.png

After

Width: 240  |  Height: 360  |  Size: 12 KiB

BIN
uno/img/cards/BLUE/7.png

After

Width: 240  |  Height: 360  |  Size: 8.4 KiB

BIN
uno/img/cards/BLUE/8.png

After

Width: 240  |  Height: 360  |  Size: 12 KiB

BIN
uno/img/cards/BLUE/9.png

After

Width: 240  |  Height: 360  |  Size: 12 KiB

BIN
uno/img/cards/BLUE/A.png

After

Width: 240  |  Height: 360  |  Size: 15 KiB

BIN
uno/img/cards/BLUE/R.png

After

Width: 240  |  Height: 360  |  Size: 9.9 KiB

BIN
uno/img/cards/GREEN/+2.png

After

Width: 240  |  Height: 360  |  Size: 14 KiB

BIN
uno/img/cards/GREEN/0.png

After

Width: 240  |  Height: 360  |  Size: 14 KiB

BIN
uno/img/cards/GREEN/1.png

After

Width: 240  |  Height: 360  |  Size: 9.2 KiB

BIN
uno/img/cards/GREEN/2.png

After

Width: 240  |  Height: 360  |  Size: 14 KiB

BIN
uno/img/cards/GREEN/3.png

After

Width: 240  |  Height: 360  |  Size: 14 KiB

BIN
uno/img/cards/GREEN/4.png

After

Width: 240  |  Height: 360  |  Size: 12 KiB

BIN
uno/img/cards/GREEN/5.png

After

Width: 240  |  Height: 360  |  Size: 12 KiB

BIN
uno/img/cards/GREEN/6.png

After

Width: 240  |  Height: 360  |  Size: 15 KiB

BIN
uno/img/cards/GREEN/7.png

After

Width: 240  |  Height: 360  |  Size: 9.6 KiB

BIN
uno/img/cards/GREEN/8.png

After

Width: 240  |  Height: 360  |  Size: 15 KiB

BIN
uno/img/cards/GREEN/9.png

After

Width: 240  |  Height: 360  |  Size: 15 KiB

BIN
uno/img/cards/GREEN/A.png

After

Width: 240  |  Height: 360  |  Size: 17 KiB

BIN
uno/img/cards/GREEN/R.png

After

Width: 240  |  Height: 360  |  Size: 11 KiB

BIN
uno/img/cards/NONE/+4.png

After

Width: 240  |  Height: 360  |  Size: 14 KiB

BIN
uno/img/cards/NONE/CC.png

After

Width: 240  |  Height: 360  |  Size: 16 KiB

BIN
uno/img/cards/RED/+2.png

After

Width: 240  |  Height: 360  |  Size: 12 KiB

BIN
uno/img/cards/RED/0.png

After

Width: 240  |  Height: 360  |  Size: 11 KiB

BIN
uno/img/cards/RED/1.png

After

Width: 240  |  Height: 360  |  Size: 7.9 KiB

BIN
uno/img/cards/RED/2.png

After

Width: 240  |  Height: 360  |  Size: 11 KiB

BIN
uno/img/cards/RED/3.png

After

Width: 240  |  Height: 360  |  Size: 12 KiB

BIN
uno/img/cards/RED/4.png

After

Width: 240  |  Height: 360  |  Size: 9.6 KiB

BIN
uno/img/cards/RED/5.png

After

Width: 240  |  Height: 360  |  Size: 10 KiB

BIN
uno/img/cards/RED/6.png

After

Width: 240  |  Height: 360  |  Size: 12 KiB

BIN
uno/img/cards/RED/7.png

After

Width: 240  |  Height: 360  |  Size: 8.4 KiB

BIN
uno/img/cards/RED/8.png

After

Width: 240  |  Height: 360  |  Size: 12 KiB

BIN
uno/img/cards/RED/9.png

After

Width: 240  |  Height: 360  |  Size: 12 KiB

BIN
uno/img/cards/RED/A.png

After

Width: 240  |  Height: 360  |  Size: 14 KiB

BIN
uno/img/cards/RED/R.png

After

Width: 240  |  Height: 360  |  Size: 9.5 KiB

BIN
uno/img/cards/YELLOW/+2.png

After

Width: 240  |  Height: 360  |  Size: 12 KiB

BIN
uno/img/cards/YELLOW/0.png

After

Width: 240  |  Height: 360  |  Size: 12 KiB

BIN
uno/img/cards/YELLOW/1.png

After

Width: 240  |  Height: 360  |  Size: 8.1 KiB

BIN
uno/img/cards/YELLOW/2.png

After

Width: 240  |  Height: 360  |  Size: 12 KiB

BIN
uno/img/cards/YELLOW/3.png

After

Width: 240  |  Height: 360  |  Size: 12 KiB

BIN
uno/img/cards/YELLOW/4.png

After

Width: 240  |  Height: 360  |  Size: 10 KiB

BIN
uno/img/cards/YELLOW/5.png

After

Width: 240  |  Height: 360  |  Size: 11 KiB

BIN
uno/img/cards/YELLOW/6.png

After

Width: 240  |  Height: 360  |  Size: 13 KiB

BIN
uno/img/cards/YELLOW/7.png

After

Width: 240  |  Height: 360  |  Size: 8.6 KiB

BIN
uno/img/cards/YELLOW/8.png

After

Width: 240  |  Height: 360  |  Size: 13 KiB

BIN
uno/img/cards/YELLOW/9.png

After

Width: 240  |  Height: 360  |  Size: 13 KiB

BIN
uno/img/cards/YELLOW/A.png

After

Width: 240  |  Height: 360  |  Size: 14 KiB

BIN
uno/img/cards/YELLOW/R.png

After

Width: 240  |  Height: 360  |  Size: 9.9 KiB

BIN
uno/img/stackCards/BLUE/+2.png

After

Width: 243  |  Height: 221  |  Size: 16 KiB

BIN
uno/img/stackCards/BLUE/+4.png

After

Width: 243  |  Height: 221  |  Size: 20 KiB

BIN
uno/img/stackCards/BLUE/0.png

After

Width: 243  |  Height: 221  |  Size: 16 KiB

BIN
uno/img/stackCards/BLUE/1.png

After

Width: 243  |  Height: 221  |  Size: 12 KiB

BIN
uno/img/stackCards/BLUE/2.png

After

Width: 243  |  Height: 221  |  Size: 14 KiB

BIN
uno/img/stackCards/BLUE/3.png

After

Width: 243  |  Height: 221  |  Size: 14 KiB

BIN
uno/img/stackCards/BLUE/4.png

After

Width: 243  |  Height: 221  |  Size: 13 KiB

BIN
uno/img/stackCards/BLUE/5.png

After

Width: 243  |  Height: 221  |  Size: 14 KiB

BIN
uno/img/stackCards/BLUE/6.png

After

Width: 243  |  Height: 221  |  Size: 14 KiB

BIN
uno/img/stackCards/BLUE/7.png

After

Width: 243  |  Height: 221  |  Size: 13 KiB

BIN
uno/img/stackCards/BLUE/8.png

After

Width: 243  |  Height: 221  |  Size: 14 KiB

BIN
uno/img/stackCards/BLUE/9.png

After

Width: 243  |  Height: 221  |  Size: 14 KiB

BIN
uno/img/stackCards/BLUE/CC.png

After

Width: 243  |  Height: 221  |  Size: 17 KiB

BIN
uno/img/stackCards/BLUE/R.png

After

Width: 243  |  Height: 221  |  Size: 15 KiB

BIN
uno/img/stackCards/BLUE/S.png

After

Width: 243  |  Height: 221  |  Size: 16 KiB

BIN
uno/img/stackCards/FirstDrawCard.png

After

Width: 243  |  Height: 221  |  Size: 36 KiB

BIN
uno/img/stackCards/GREEN/+2.png

After

Width: 243  |  Height: 221  |  Size: 19 KiB

BIN
uno/img/stackCards/GREEN/+4.png

After

Width: 243  |  Height: 221  |  Size: 22 KiB

BIN
uno/img/stackCards/GREEN/0.png

After

Width: 243  |  Height: 221  |  Size: 17 KiB

BIN
uno/img/stackCards/GREEN/1.png

After

Width: 243  |  Height: 221  |  Size: 14 KiB

BIN
uno/img/stackCards/GREEN/2.png

After

Width: 243  |  Height: 221  |  Size: 17 KiB

BIN
uno/img/stackCards/GREEN/3.png

After

Width: 243  |  Height: 221  |  Size: 17 KiB

BIN
uno/img/stackCards/GREEN/4.png

After

Width: 243  |  Height: 221  |  Size: 16 KiB

BIN
uno/img/stackCards/GREEN/5.png

After

Width: 243  |  Height: 221  |  Size: 16 KiB

BIN
uno/img/stackCards/GREEN/6.png

After

Width: 243  |  Height: 221  |  Size: 18 KiB

BIN
uno/img/stackCards/GREEN/7.png

After

Width: 243  |  Height: 221  |  Size: 15 KiB

BIN
uno/img/stackCards/GREEN/8.png

After

Width: 243  |  Height: 221  |  Size: 17 KiB

BIN
uno/img/stackCards/GREEN/9.png

After

Width: 243  |  Height: 221  |  Size: 18 KiB

BIN
uno/img/stackCards/GREEN/CC.png

After

Width: 243  |  Height: 221  |  Size: 19 KiB

BIN
uno/img/stackCards/GREEN/R.png

After

Width: 243  |  Height: 221  |  Size: 17 KiB

BIN
uno/img/stackCards/GREEN/S.png

After

Width: 243  |  Height: 221  |  Size: 19 KiB

BIN
uno/img/stackCards/NONE/+4.png

After

Width: 243  |  Height: 221  |  Size: 18 KiB

BIN
uno/img/stackCards/NONE/CC.png

After

Width: 243  |  Height: 221  |  Size: 17 KiB

BIN
uno/img/stackCards/RED/+2.png

After

Width: 243  |  Height: 221  |  Size: 16 KiB

BIN
uno/img/stackCards/RED/+4.png

After

Width: 243  |  Height: 221  |  Size: 20 KiB

BIN
uno/img/stackCards/RED/0.png

After

Width: 243  |  Height: 221  |  Size: 14 KiB

BIN
uno/img/stackCards/RED/1.png

After

Width: 243  |  Height: 221  |  Size: 12 KiB

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save