0.0.1 • Published 6 years ago

@ashawnbandy/dw-guess v0.0.1

Weekly downloads
1
License
ISC
Repository
-
Last release
6 years ago

No Points!!!

Discussion

I made the following changes and choices:

  • There are no points to be had from making a valid selection.

  • There is no button to start a game, instead any player may get things going by clicking on the text input. Really, the area is larger but not explicitly identified.

  • There is a random waiting period between starting the game and when the text input is enabled. The input itself doesn't indicate any change, only the progress bar serving as a countdown timer to show that the game is in motion.

  • I chose to have only one game session available (i.e. the sharable link) but left room in the schema to expand if desired in the future.

  • In place of a point system, players may choose to "battle" one another by stealing previously entered words.

  • Users are identified only by the first five digits of a uuid.

  • The overall theme is a throwback to 8-bit games: made intentionally slow and slightly frustrating.

Rationale

I simply wanted to explore the problem in my own way and the implementation and layout evolved as I went along.

Architecture

Dev dependencies

  • lit-element provides web component infrastructure. Most modern browsers support web components but this application will only be tested on Chrome 76 given the scope.

  • rollup will, well, rollup source files with dependencies into a single deliverable in esm format. Again, it may not work in older browsers but we're keeping things up-to-date, right?

  • npm brings in the wealth of node packages for use but it is for front-end only. The entire deliverable will be one more html, css and javascript files to be served by anything that supports those files without modification. We also use npm to run our scripts during development.

  • docker is an optional dependency.

Directory structure

  • src javascript source files, typically lit-element elements.src

  • static bundled source files, html and css files for serving

Requirements

Using Google Firebase—no server-side code, just HTML + CSS + JavaScript—create a multi-player game where players race to enter words using only random letters you provide them. Order of the letters doesn't matter, but each letter can be used at most once per word.

  1. Players should be able to start a new game and be given an invitation link to share with other players. The links can be simply copy-and-pasted to other players outside the application.

  2. The game creator should be able to press a play button whenever they are ready, and all players should be able to compete in real-time. It's fine to assume players will not reload the page once they go to it.

  3. Once a word is entered, it cannot be entered again by anyone including other players (i.e. only the first person to enter it gets credit).

  4. The game ends after one minute.

  5. Each game has nine randomly generated letters, with a minimum of two vowels and two consonants each time.

  6. Scoring of your choice.

  7. You can choose your own additional rules.

  8. A dictionary reference is not necessary for this exercise.

  9. Security of any kind is not necessary, but we may ask you afterward about security holes and how you would handle them in the real world.

0.0.1

6 years ago