Giter Site home page Giter Site logo

chess's Introduction

Chess

image

This is a chessboard which records which squares you clicked. You can play with it here.

Setup

  1. git clone this repo
  2. Install pnpm on your machine
  3. pnpm i
  4. pnpm dev
  5. App should be live in localhost:3000
  6. pnpm test to run the automated tests

Application Requirements

  1. Create a page with a chessboard and a sidebar.
  2. On desktop devices the sidebar should be positioned to the right of the chessboard.
  3. On mobile devices the sidebar should be positioned below the chessboard.
  4. The chessboard should resize responsively to consume available space.
  5. Clicking a chessboard square should highlight the square.
  6. Keep track of which squares are clicked and the order in which they're clicked.
  7. Display the information collected from step 6 in the sidebar.

Notes

  1. This app is fully responsive (mobile, tablet, desktop). The chessboard will grow to consume the available space.
  2. As a bonus I added a feature where user can change the theme of the board. I implemented this feature using CSS variables.
  3. I added a Vitest component test to ensure that the main functions are working well. See this test file.

Improvement List

  1. Create reusable TS enum and type for type Theme = 'Green' | 'Brown' | 'Purple'.
  2. Improve the ThemeSelect component to use a better dropdown component.
  3. Use vue-i18n instead of hardcoding texts.
  4. Add test for the "theme switching" feature.

chess's People

Contributors

albertpratomo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.