March 2020 Code Challenges

We are going to be build a game! It's going to take a couple of months and this is the first part

Building a fighting game (Part 1)

In this challenge you will be setting up the game environment You can mix PHP, JavaScript, HTML and CSS. Frameworks are allowed however bonus points if you don't use frameworks

Level 1 - Build a table

  • Build a semantically correct HTML table with the following headers:

    • Name
    • Type
    • Strength
    • Health
    • Special Power
    • Action

Level 2

  • Populate the table with 100 creatures at random with different health and strength points
  • There must be 4 types of creatures. These are:

    • Witches
    • Dragons
    • Snakes
    • River trolls
  • The following health and strength rules must apply:

Witches

  • Strength between 60 - 80
  • Health between 50 - 60

Dragons

  • Strength between 80 - 90
  • Health between 80 - 90

Snakes

  • Strength between 30 - 60
  • Health between 30 - 90

River Trolls

  • Strength between 22 - 65
  • Health between 60 - 92

Level 3

  • Each row should have a different background colour
  • Each type should have a different image
  • Add 3 buttons to the actions column these should be

    • Delete
    • Increase health
    • Decrease health
  • Each button should display an alert that shows the type of action pressed
  • Use an emoji for each of the buttons instead of text.

Level 4

  • Create a button above the table with the value of 'Roll The Dice'

    • This should display an alert with the message 'About to fight'
  • Create a button above the table with the value of 'Reset'

    • This should refresh the table.

Level master

  • Don't use any frameworks!

We will be using this setup for Aprils challenge. So make it look good! :)