Skip to content

Latest commit

 

History

History
77 lines (54 loc) · 2.68 KB

README.md

File metadata and controls

77 lines (54 loc) · 2.68 KB

card-game

This template should help get you started developing with Vue 3 in Vite.

Recommended IDE Setup

VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).

Type Support for .vue Imports in TS

TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue types.

If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:

  1. Disable the built-in TypeScript Extension
    1. Run Extensions: Show Built-in Extensions from VSCode's command palette
    2. Find TypeScript and JavaScript Language Features, right click and select Disable (Workspace)
  2. Reload the VSCode window by running Developer: Reload Window from the command palette.

Customize configuration

See Vite Configuration Reference.

Project Setup

yarn install

Compile and Hot-Reload for Development

yarn run dev

Type-Check, Compile and Minify for Production

yarn run build

Run Unit Tests with Vitest

yarn run test:unit

Run End-to-End Tests with Playwright

# Install browsers for the first run
npx playwright install

# When testing on CI, must build the project first
yarn run build

# Runs the end-to-end tests
yarn run test:e2e
# Runs the tests only on Chromium
yarn run test:e2e -- --project=chromium
# Runs the tests of a specific file
yarn run test:e2e -- tests/example.spec.ts
# Runs the tests in debug mode
yarn run test:e2e -- --debug

Lint with ESLint

yarn run lint

### Game Rules => The game consists of 4 players and spans 5 rounds, => In each round, an additional card is dealt to every player, => ♣ (Spades) awards 4 points, ♦ (Diamonds) awards 3 points, ♥ (Hearts) awards 2 points, and ♠ (Clubs) awards 1 point, => Players scores are calculated by multiplying the value of their cards with the corresponding points for the suits, => The game concludes after 5 rounds, and player scores are tallied. The player with the highest score emerges as the winner,