PHP Tutorial: Number Guessing Game (no database required)


Online Game Development

Wow I guess it’s been a while since I’ve posted anything. I’ve been busy moving and working on my games but I did find a few minutes to make this little game. This randomly picks a number and then lets the player try to guess the number. If you like this game you might also like my Ajax Tic-Tac-Toe game or Ajax Hangman game. This assumes that you’ve already done some of my other game tutorials so you are familiar with my game manager and how it works. You can read the code below or you can be lazy and can download the code or view a working example.

<?php /*** * File: oop/class.guessnumber.php * Author: design1online.com, LLC * Created: 8.21.2014 * License: Public GNU ***/ class guessnumber extends game {     var $guesses;              //int - maximum guesses per game     var $randomNumber = null; …

View original post 864 more words

Advertisements
About

myself pramodh kumar yet another php developer from India and have worked on oops,procedural,yii framework,codeigniter,wordpress,joomla,api and more.

Tagged with: ,
Posted in php

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow php tutorial on WordPress.com
categories
Calendar
August 2014
M T W T F S S
« Jul   Sep »
 123
45678910
11121314151617
18192021222324
25262728293031
Follow me on Twitter
Blog Stats
  • 73,741 hits
%d bloggers like this: