Code Monkey home page Code Monkey logo

socket-programming's Introduction

forthebadge made-with-python

Socket-Programming

Server and Client Based (MultiUser) Hangman Game

Client-Server

Server-side features :

  • Asking that how many players there will be.
  • Registering each player/client to the server so each player will have a unique ID. For registration, each player creates an account for itself on the server (a password is necessary for each account).
  • Communicating with just one player or more than one player at a time.
  • Keeping latest status information and showing this information to the players.
  • Getting guesses from players in order and compare with the phrase.
  • Keeping the order of players and inform to all players about which player will play next (order will be determined from connection order to the server to play).
  • Keeping wrong guesses for both letters and phrases.
  • Showing current guess of the player to other players.
  • Calculation of remaining allowed attempts.

Rules:

  1. The game starts after specified number of players connect to the server.
  2. Allowed number of attempts decrease one by one in exchange for each wrong letter guess or each wrong phrase guess.
  3. Server accepts lowercase or uppercase letter for both letter guesses and phrase guesses. But if user enters an uppercase letter, you have to convert to lowercase.
  4. If the user enters two or more letters instead of one letter or enters a number, these count as wrong guess and as a result number of attempt decrease.
  5. The game terminates after 7 wrong guesses.
  6. The game also terminates if one player guesses whole phrase right or all letters are guesses correctly.
  7. The player who registered before should inform the server if she/he wants to play again.

Sample Game Images

1 2 3 4 5 6 7 8 9 10

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.