diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..a547bf3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/README.md b/README.md new file mode 100644 index 0000000..45106eb --- /dev/null +++ b/README.md @@ -0,0 +1,191 @@ +# Solitaire, Freecell, Spider + +## Navigation + +- Side navigation + - Back + - Content + - Main menu + - Horizontal Layout + - Solitaire + - Freecell + - Spider + - Text Buttons + - How to play + - Stats + - Settings + - About + - How to play + - Tabbed Content + - Tab Spider + - Tab Solitaire + - Tab Freecel + - Tab Panel + - Scrollable View + - Stats + - Vertical Layout + - Solitaire nb games played + - Freecell nb games played + - Spider nb games played + - Tabbed Content + - Tab Last activity + - Scrollable View + - Tab Nb games played + - Scrollable View + - Tabbed Content + - Tab all + - Tab game over + - Tab game completed + - Tab incomplete + - Tab Panel + - Game Mini view + - Game Mini View + - Game Name + - Date + - Score + - Status + - Mini game view + - Settings + - Scrollable View + - Dropdown Selection + - Toggle Selection + - About + - Scrollable View + - External Links + - External link icon + - Solitaire + - Game area + - New game + - Settings + - Freecel + - Game area + - New game + - Settings + - Spider + - Game area + - New game + - Settings + - Dialogs + - New game prompt + - End game + +## Dialogs + +- New game prompt + +Current game will be archived. +Do you want to start a new game? +- Yes, No + +- End game + +Game over nickname. No moves available. +Good game nickname. You completed this level. +You scored 62. New highscore. +- New game, View Stats, Main menu + +## Stats + +- Solitaire nb games played +- Freecell nb games played +- Spider nb games played +- Last activity + - Today + - 3 times played solitaire + - Yesterday + - 2 times played freecel +- Nb games played + - All + - Game over + - Game completed + - Incomplete + +- Game box + - Spider, Solitaire, Freecel + - 1 months ago + - Score + - Game status + - Mini game area + + +## Main menu + +Game selection +Settings +About + +## Settings + +Color theme +- Pink +- Blue +- Orange +- Black + +Sounds +- On +- Off + +Language +- English +- French +- Italian +- German + +## About + +A hobby project, created in 2023 by [eguneys](https://eguneys.github.io). + +A fun way to pass time with 3 solitaire games. [Solitaire](), [Freecell](), and [Spider](). + +- This project is free and open source at [Github](https://github.com/eguneys/solitaire23) +- Other games will be linked here when available. + +- Consider donating at [Patreon](https://www.patreon.com/eguneys). + +- For business inquiries please contact me on twitter @eguneys. + +## Solitaire + +Solitaire is played with a standard 52-card deck. +A tableu of 7 piles of cards are laid, first pile contains 1 card, second pile contains 2 cards and so on. The topmost card of each pile is turned face up, the cards behind are turned face down. +The remaining cards form the stock and are placed facedown at the upper left. + +The four foundations are built up by suit from Ace to King. +The tableu piles can be built down by alternate colors. +Every face-up card in a partial pile, or a complete pile, can be moved, as a unit, to another tableu pile on the basis of its highest card. +Any empty piles can be filled with a King, or a pile of cards with a King. + +The aim of the game is to build up four stacks of cards from Ace to King for each suit, on one of the four foundations. + +There are different ways of dealing the stock cards to the waste depending on these two settings. + +Turning cards +- Three cards: Turning three cards at once to the waste +- One card: Turning one card at once to the waste + +Turning limit +- No limit: no limit on passes through the deck. +- 3 passes: 3 passes through the deck. +- 1 pass: 1 pass through the deck. + + +- If all face up cards in a tableu is moved, the topmost back facing card is turned over. +- Cards in waste can be moved to a tableu or a foundation. +- The topmost card in a foundation can be moved back to a tableu. +- If the stock is empty and there are cards in the waste, waste cards can be recycled back to stock if pass through the deck is allowed according to turning limit. +- Moves can be undo with the undo button. + + +The scoring system is: + +- waste to tableu: 5 points +- waste to foundation: 10 points +- tableu to foundation: 10 points +- turn over tableu card: 5 points +- foundation to tableu: -15 points +- recycle waste: -70 points +- undo a move: -30 points + +## Freecell +## Spider diff --git a/content/sprites/palette.ase b/content/sprites/palette.ase new file mode 100755 index 0000000..20f7626 Binary files /dev/null and b/content/sprites/palette.ase differ diff --git a/index.html b/index.html new file mode 100755 index 0000000..f86e483 --- /dev/null +++ b/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + TS + + +
+ + + diff --git a/package.json b/package.json new file mode 100755 index 0000000..7b295f0 --- /dev/null +++ b/package.json @@ -0,0 +1,15 @@ +{ + "name": "solitaire23", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "preview": "vite preview" + }, + "devDependencies": { + "typescript": "^4.6.4", + "vite": "^3.2.3" + } +} \ No newline at end of file diff --git a/public/vite.svg b/public/vite.svg new file mode 100755 index 0000000..e7b8dfb --- /dev/null +++ b/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/screens/navigation.ase b/screens/navigation.ase new file mode 100755 index 0000000..78d925e Binary files /dev/null and b/screens/navigation.ase differ diff --git a/src/counter.ts b/src/counter.ts new file mode 100755 index 0000000..09e5afd --- /dev/null +++ b/src/counter.ts @@ -0,0 +1,9 @@ +export function setupCounter(element: HTMLButtonElement) { + let counter = 0 + const setCounter = (count: number) => { + counter = count + element.innerHTML = `count is ${counter}` + } + element.addEventListener('click', () => setCounter(counter + 1)) + setCounter(0) +} diff --git a/src/main.ts b/src/main.ts new file mode 100755 index 0000000..df7c82c --- /dev/null +++ b/src/main.ts @@ -0,0 +1,23 @@ +import './style.css' +import typescriptLogo from './typescript.svg' +import { setupCounter } from './counter' + +document.querySelector('#app')!.innerHTML = ` +
+ + + + + + +

Vite + TypeScript

+
+ +
+

+ Click on the Vite and TypeScript logos to learn more +

+
+` + +setupCounter(document.querySelector('#counter')!) diff --git a/src/style.css b/src/style.css new file mode 100755 index 0000000..ac37d84 --- /dev/null +++ b/src/style.css @@ -0,0 +1,97 @@ +:root { + font-family: Inter, Avenir, Helvetica, Arial, sans-serif; + font-size: 16px; + line-height: 24px; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-text-size-adjust: 100%; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +.logo { + height: 6em; + padding: 1.5em; + will-change: filter; +} +.logo:hover { + filter: drop-shadow(0 0 2em #646cffaa); +} +.logo.vanilla:hover { + filter: drop-shadow(0 0 2em #3178c6aa); +} + +.card { + padding: 2em; +} + +.read-the-docs { + color: #888; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/src/typescript.svg b/src/typescript.svg new file mode 100755 index 0000000..d91c910 --- /dev/null +++ b/src/typescript.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts new file mode 100755 index 0000000..11f02fe --- /dev/null +++ b/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/tsconfig.json b/tsconfig.json new file mode 100755 index 0000000..eac16d1 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "target": "ESNext", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ESNext", "DOM"], + "moduleResolution": "Node", + "strict": true, + "resolveJsonModule": true, + "isolatedModules": true, + "esModuleInterop": true, + "noEmit": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "skipLibCheck": true + }, + "include": ["src"] +}