Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
a25562f
Initial commit after fork and clone
hertantoirawan Dec 7, 2021
a111205
Add scoring logic
hertantoirawan Dec 10, 2021
3ef6bf4
Add hand score, credits, bets
hertantoirawan Dec 11, 2021
4cd58c1
Add calcHandScore test cases with Jest
hertantoirawan Dec 12, 2021
f9cc2c4
Replace jest with cypress for testing
hertantoirawan Dec 13, 2021
3efa18b
Separate calculate score, winnings, and update credits
hertantoirawan Dec 15, 2021
b10f31c
Use nes.css framework
hertantoirawan Dec 15, 2021
c36d8ae
Design UI in html only
hertantoirawan Dec 16, 2021
36f90d0
Finish wireframe design
hertantoirawan Dec 17, 2021
17b22f8
Add messages, disable buttons, fix 3-of-a-kind bug
hertantoirawan Dec 20, 2021
8b983fd
Use images for cards
hertantoirawan Dec 21, 2021
30f11d9
Disable card holds during betting
hertantoirawan Dec 21, 2021
fb0c6d5
Move guide buttons and dialogs into js
hertantoirawan Dec 22, 2021
8015ebf
Use pokemon cards
hertantoirawan Dec 22, 2021
a908856
Add game over dialog and audio
hertantoirawan Dec 22, 2021
0febd97
Implement konami code
hertantoirawan Dec 23, 2021
b7813a2
Add function to deal selected cards
hertantoirawan Dec 23, 2021
eb2f1f7
Fix overflow-x bug in dialog
hertantoirawan Dec 23, 2021
72e7dec
Add guaranteed win code
hertantoirawan Dec 27, 2021
a3f050d
Add skip counting winning feature
hertantoirawan Dec 27, 2021
207bdff
Add option page to change settings
hertantoirawan Dec 27, 2021
b80ab93
Change background color based on host
hertantoirawan Dec 27, 2021
8cc2fc8
Remove extra multiplier magic number
hertantoirawan Dec 27, 2021
6f29f06
Set default host on index.html
hertantoirawan Dec 27, 2021
8d9bb85
Add null check
hertantoirawan Dec 27, 2021
aef5630
Handle null localStorage values
hertantoirawan Dec 27, 2021
4e7d3f4
Remove autoplay music for consistency
hertantoirawan Dec 27, 2021
92ea298
Handle null game music localStorage
hertantoirawan Dec 27, 2021
103f33a
Add favicon
hertantoirawan Dec 27, 2021
911b417
Add hints
hertantoirawan Dec 30, 2021
e2e54ff
Fix bet not reset after not winning
hertantoirawan Dec 30, 2021
7adffbb
Fix overlapping hint message
hertantoirawan Dec 30, 2021
6363a27
Update README.md
hertantoirawan Dec 30, 2021
cd55813
Update README.md
hertantoirawan Dec 30, 2021
af7e0aa
Update README.md
hertantoirawan Dec 30, 2021
3853f8b
Update README.md
hertantoirawan Dec 30, 2021
2efc638
Update README.md
hertantoirawan Dec 30, 2021
2a97221
Fix hint when suggested to replace all cards
hertantoirawan Dec 30, 2021
a86bafe
Put cypress samples in gitignore
hertantoirawan Dec 30, 2021
ee92958
Put cypress samples in gitignore
hertantoirawan Dec 30, 2021
ddfd06a
Remove cypress sample files
hertantoirawan Dec 30, 2021
b3fb393
Update README.md
hertantoirawan Dec 31, 2021
e123612
Put coverage folder in gitignore
hertantoirawan Dec 31, 2021
f161ca0
Test new card hold css in wireframe
hertantoirawan Dec 31, 2021
51f97e3
Add hold text on card when held
hertantoirawan Dec 31, 2021
8fc8e11
Close cards when new betting starts
hertantoirawan Dec 31, 2021
8acba5f
Update README.md
hertantoirawan Dec 31, 2021
764a9f3
Update README.md
hertantoirawan Dec 31, 2021
02d4d8b
Update README.md
hertantoirawan Jan 4, 2022
23d1ccd
Update README.md
hertantoirawan Jan 4, 2022
4b431a6
Update README.md
hertantoirawan Jan 4, 2022
bafb00f
Update README.md
hertantoirawan Jan 4, 2022
074e12c
Remove unnecessary comments
hertantoirawan Jan 5, 2022
80fc74d
Merge branch 'master' of https://github.com/hertantoirawan/video-poke…
hertantoirawan Jan 5, 2022
cb3f5a4
Add param types to JSDoc comments
hertantoirawan Jan 5, 2022
7f897e2
Fix live link due to repo name change
hertantoirawan Nov 16, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
module.exports = {
env: {
browser: true,
es2020: true,
commonjs: true,
es2021: true,
},
plugins: [
],
extends: [
'airbnb-base',
'plugin:cypress/recommended',
],
parserOptions: {
ecmaVersion: 11,
ecmaVersion: 13,
},
rules: {
// Don't enforce control flow closing curly brace needs to be
// on same line as next control flow opening statement
'brace-style': 'off',
// Disable linebreak style to prevent ESLint errors on Windows line endings
// https://eslint.org/docs/rules/linebreak-style
'linebreak-style': 'off',
// Allow console for students to debug
'no-console': 'off',
// Allow function param reassign for array or object elements or properties
'no-param-reassign': ['error', { props: false }],
},
};
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@

# Dependency directories
node_modules/

# Cypress sample directories and files
coverage/
cypress/integration/1-getting-started/
cypress/integration/2-advanced-examples/

341 changes: 341 additions & 0 deletions 8bitdeck.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,341 @@
.pokemon-back {
background: url("./assets/pokemon-back.png") no-repeat;
width: 90px;
height: 123px;
}

.red-back {
background: url("./assets/8BitDeckAssets.png") no-repeat -2px -2px;
width: 90px;
height: 123px;
}

.blue-back {
background: url("./assets/8BitDeckAssets.png") no-repeat -2px -129px;
width: 90px;
height: 123px;
}

.red-joker {
background: url("./assets/8BitDeckAssets.png") no-repeat -2px -256px;
width: 90px;
height: 123px;
}

.blue-joker {
background: url("./assets/8BitDeckAssets.png") no-repeat -2px -383px;
width: 90px;
height: 123px;
}

.hearts-2 {
background: url("./assets/8BitDeckAssets.png") no-repeat -96px -2px;
width: 91px;
height: 123px;
}

.hearts-3 {
background: url("./assets/8BitDeckAssets.png") no-repeat -191px -2px;
width: 90px;
height: 123px;
}

.hearts-4 {
background: url("./assets/8BitDeckAssets.png") no-repeat -285px -2px;
width: 91px;
height: 123px;
}

.hearts-5 {
background: url("./assets/8BitDeckAssets.png") no-repeat -380px -2px;
width: 90px;
height: 123px;
}

.hearts-6 {
background: url("./assets/8BitDeckAssets.png") no-repeat -474px -2px;
width: 91px;
height: 123px;
}

.hearts-7 {
background: url("./assets/8BitDeckAssets.png") no-repeat -569px -2px;
width: 90px;
height: 123px;
}

.hearts-8 {
background: url("./assets/8BitDeckAssets.png") no-repeat -663px -2px;
width: 91px;
height: 123px;
}

.hearts-9 {
background: url("./assets/8BitDeckAssets.png") no-repeat -758px -2px;
width: 90px;
height: 123px;
}

.hearts-10 {
background: url("./assets/8BitDeckAssets.png") no-repeat -852px -2px;
width: 91px;
height: 123px;
}

.hearts-jack {
background: url("./assets/8BitDeckAssets.png") no-repeat -947px -2px;
width: 90px;
height: 123px;
}

.hearts-queen {
background: url("./assets/8BitDeckAssets.png") no-repeat -1041px -2px;
width: 91px;
height: 123px;
}

.hearts-king {
background: url("./assets/8BitDeckAssets.png") no-repeat -1136px -2px;
width: 90px;
height: 123px;
}

.hearts-ace {
background: url("./assets/8BitDeckAssets.png") no-repeat -1231px -2px;
width: 90px;
height: 123px;
}

.clubs-2 {
background: url("./assets/8BitDeckAssets.png") no-repeat -96px -129px;
width: 91px;
height: 123px;
}

.clubs-3 {
background: url("./assets/8BitDeckAssets.png") no-repeat -191px -129px;
width: 90px;
height: 123px;
}

.clubs-4 {
background: url("./assets/8BitDeckAssets.png") no-repeat -285px -129px;
width: 91px;
height: 123px;
}

.clubs-5 {
background: url("./assets/8BitDeckAssets.png") no-repeat -380px -129px;
width: 90px;
height: 123px;
}

.clubs-6 {
background: url("./assets/8BitDeckAssets.png") no-repeat -474px -129px;
width: 91px;
height: 123px;
}

.clubs-7 {
background: url("./assets/8BitDeckAssets.png") no-repeat -569px -129px;
width: 90px;
height: 123px;
}

.clubs-8 {
background: url("./assets/8BitDeckAssets.png") no-repeat -663px -129px;
width: 91px;
height: 123px;
}

.clubs-9 {
background: url("./assets/8BitDeckAssets.png") no-repeat -758px -129px;
width: 90px;
height: 123px;
}

.clubs-10 {
background: url("./assets/8BitDeckAssets.png") no-repeat -852px -129px;
width: 91px;
height: 123px;
}

.clubs-jack {
background: url("./assets/8BitDeckAssets.png") no-repeat -947px -129px;
width: 90px;
height: 123px;
}

.clubs-queen {
background: url("./assets/8BitDeckAssets.png") no-repeat -1041px -129px;
width: 91px;
height: 123px;
}

.clubs-king {
background: url("./assets/8BitDeckAssets.png") no-repeat -1136px -129px;
width: 90px;
height: 123px;
}

.clubs-ace {
background: url("./assets/8BitDeckAssets.png") no-repeat -1231px -129px;
width: 90px;
height: 123px;
}

.diamonds-2 {
background: url("./assets/8BitDeckAssets.png") no-repeat -96px -256px;
width: 91px;
height: 123px;
}

.diamonds-3 {
background: url("./assets/8BitDeckAssets.png") no-repeat -191px -256px;
width: 90px;
height: 123px;
}

.diamonds-4 {
background: url("./assets/8BitDeckAssets.png") no-repeat -285px -256px;
width: 91px;
height: 123px;
}

.diamonds-5 {
background: url("./assets/8BitDeckAssets.png") no-repeat -380px -256px;
width: 90px;
height: 123px;
}

.diamonds-6 {
background: url("./assets/8BitDeckAssets.png") no-repeat -474px -256px;
width: 91px;
height: 123px;
}

.diamonds-7 {
background: url("./assets/8BitDeckAssets.png") no-repeat -569px -256px;
width: 90px;
height: 123px;
}

.diamonds-8 {
background: url("./assets/8BitDeckAssets.png") no-repeat -663px -256px;
width: 91px;
height: 123px;
}

.diamonds-9 {
background: url("./assets/8BitDeckAssets.png") no-repeat -758px -256px;
width: 90px;
height: 123px;
}

.diamonds-10 {
background: url("./assets/8BitDeckAssets.png") no-repeat -852px -256px;
width: 91px;
height: 123px;
}

.diamonds-jack {
background: url("./assets/8BitDeckAssets.png") no-repeat -947px -256px;
width: 90px;
height: 123px;
}

.diamonds-queen {
background: url("./assets/8BitDeckAssets.png") no-repeat -1041px -256px;
width: 91px;
height: 123px;
}

.diamonds-king {
background: url("./assets/8BitDeckAssets.png") no-repeat -1136px -256px;
width: 90px;
height: 123px;
}

.diamonds-ace {
background: url("./assets/8BitDeckAssets.png") no-repeat -1231px -256px;
width: 90px;
height: 123px;
}

.spades-2 {
background: url("./assets/8BitDeckAssets.png") no-repeat -96px -383px;
width: 91px;
height: 123px;
}

.spades-3 {
background: url("./assets/8BitDeckAssets.png") no-repeat -191px -383px;
width: 90px;
height: 123px;
}

.spades-4 {
background: url("./assets/8BitDeckAssets.png") no-repeat -285px -383px;
width: 91px;
height: 123px;
}

.spades-5 {
background: url("./assets/8BitDeckAssets.png") no-repeat -380px -383px;
width: 90px;
height: 123px;
}

.spades-6 {
background: url("./assets/8BitDeckAssets.png") no-repeat -474px -383px;
width: 91px;
height: 123px;
}

.spades-7 {
background: url("./assets/8BitDeckAssets.png") no-repeat -569px -383px;
width: 90px;
height: 123px;
}

.spades-8 {
background: url("./assets/8BitDeckAssets.png") no-repeat -663px -383px;
width: 91px;
height: 123px;
}

.spades-9 {
background: url("./assets/8BitDeckAssets.png") no-repeat -758px -383px;
width: 90px;
height: 123px;
}

.spades-10 {
background: url("./assets/8BitDeckAssets.png") no-repeat -852px -383px;
width: 91px;
height: 123px;
}

.spades-jack {
background: url("./assets/8BitDeckAssets.png") no-repeat -947px -383px;
width: 90px;
height: 123px;
}

.spades-queen {
background: url("./assets/8BitDeckAssets.png") no-repeat -1041px -383px;
width: 91px;
height: 123px;
}

.spades-king {
background: url("./assets/8BitDeckAssets.png") no-repeat -1136px -383px;
width: 90px;
height: 123px;
}

.spades-ace {
background: url("./assets/8BitDeckAssets.png") no-repeat -1231px -383px;
width: 90px;
height: 123px;
}
Loading