Code Monkey home page Code Monkey logo

guessing-game's Introduction

Guessing Game

Implement Web-based application - guessing game.

Game rules:

  • Program chooses a random secret number with 4 digits.
  • All digits in the secret number are different.
  • Player has 8 tries to guess the secret number.
  • After each guess program displays the message "M:m; P:p" where:
    • m - number of matching digits but not on the right places
    • p - number of matching digits on exact places
  • Game ends after 8 tries or if the correct number is guessed.

Samples:

Secret: 7046 Guess: 8724 Message: M:2; P:0

Secret: 7046 Guess: 7842 Message: M:0; P:2

Secret: 7046 Guess: 7640 Message: M:2; P:2

Game UI Flow

  • First Screen - display game rules with start game button at the center of the screen
    • when the game is started player must be asked the name
  • Game Screen
    • Player name
    • 4 inputs in one row - one for each input digit
    • Make Guess button
    • Number of tries left
    • Result of the previous try (previous input and M:m; P:p)
    • Log of previous tries
  • Game Over Screen
    • Player name
    • You win / You lose message
    • Secret number
    • New Game button
  • Leaderboard Screen
    • Rank layers by success rate - correct guesses/games played
    • If the success rate is the same - player with fewer total tries is ranked higher
    • Input minimum games played N - players will be included in the leaderboard if at least N games are played

Technical Requirements:

  • Use C# or Java
  • Game logic must be implemented in the backend
  • Validations must be implemented in the frontend and backend
  • Implement Unit Tests
  • For persistence use in-memory db

Bonus points for:

  • Social login ( instead of manual name enter)
  • Functional end to end tests
  • Responsive UI

Deliveries:

  • Source Code committed to this repository
  • Compiled solution that can be run with a single command/script committed to the repository in folder dist

guessing-game's People

Contributors

kashcode avatar v-aldis avatar

Watchers

 avatar  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.