PHP Development Framework YII Framework Tutorial (4) Hangman guessing word game examples

Source: Internet
Author: User
Tags yii

With an example of the previous "Hello,world" and an introduction to the Yii Framework Web Application Foundation, you can begin by introducing a simple and relatively complete Web application-hangman (guessing word game), which is published with the Yii development package. This example allows you to understand the basic steps for developing YII applications.

Speaking of "Hangman", let me think of the late 80 's CPC464 computer in the end of the "guessing word game"-hangman, every mistake once, put a villain from the gallows forward one step. At that time dos only just came out:-).

Development of a Web application, first of all, needs analysis, this is not in this tutorial, but for the sake of completeness, or the "guessing word game" rules are listed below:

Guess the word Game (English: Hangman, "the person hanged" means) is a two-person game. One player wants one word, and the other tries to guess each letter in the word the player thinks.

The word to guess is expressed in a horizontal line, letting the player know how many letters the word has. If the guessing player guesses one of the letters, the other will have to write the letter at all locations where the letter appears. If the guessed letter does not appear in the word, another player will draw one of the hanging dolls. The game will end in the following situations:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.