Create a game with PHP (Part 1)

This series covers how to make a Rock, Paper, Scissors game with PHP.

12 Responses to “Create a game with PHP (Part 1)”

  1. bowersbros says:

    yes

  2. funnyfacesproduction says:

    thx but can you give as a source code….

  3. funnyfacesproduction says:

    can i use notepad?

  4. Doyubi says:

    BOOORING! As simple as:

    switch($_GET['human']){
    case $_GET['human']:($computer==$_GET['human'])?”draw”;break:NULL /*NO BREAK */;
    case 0:($computer==1)?”win”:”lose”;break;
    case 1:($computer==2)?”win”:”lose”;break;
    case 2:($computer==0)?”win”:”lose”;break;
    }
    //SQL

  5. 3446698 says:

    Can We Get a source ?

  6. ignas2526 says:

    Nice video, but your code is very unoptimized…

  7. ScoobyDooobyD00 says:

    Thanks

  8. lifeg0eson666 says:

    Good tutorial for beginners though, good job.

  9. ScoobyDooobyD00 says:

    Thanks, I know I don’t have to add ( == TRUE ) but I prefer that, but I never paid attention to make sure it had a value.

  10. lifeg0eson666 says:

    If you do if($_GET['item']) that checks to see if it exists and HAS a value. This method is generally more efficient than using isset

  11. lifeg0eson666 says:

    You don’t have to check if a function equals TRUE or FALSE. If it’s true if(isset($_GET['item'])) works the same if you checked if it’s equal to true. And when it comes to false you can just use if(!in_array($item,$items)) instead of checking if it actually returns false. The exclamation point will do the same. And since the isset function checks if the variable EXISTS, it does not check if it has a value. You can do $item = $_GET['item'] and as long ?item= is in the URL it will return true.

  12. crazymanny00 says:

    nice vid man! :D

Leave a Reply