Posts

Showing posts with the label game

Typing game with Javascript

Image
  course from Brad Traversy Github code Features: localStorage get and set setting difficulty selects matching words score add when correct time reduces and the time add if typing correctly(time depends on difficulty level) HTML button controls the setting section at the top the setting is a form with three selections the word data will be shown in the h1 tag the text input compare to the word when the user types time on the left, score on the right and when the game end, the message shows up with the score and a reset button CSS hide the arrow on the select with appearance, for other browser adding the -webkit and -moz When focusing on select, hiding the outline the setting places at the top. when hiding, the position of the y-axis moves up the messager box show at the absolute position relative to the container and hide first. when the game ends, show up JS select all the DOM needed with id the words array or can be fetched from API the initial score is zero, and the time is 10 s...

How to create a Hangman game with Javascript

Image
  This the part of Brad Traversy’s course. F eatures: SVG drawing with line and circle for a hangman letter matching the words, separating the correct letters and wrong letters, then displaying same typing letters notification box and success box play again game with reset button and enter press Github code H TML SVG drawing : the rode is a four-line shape. x1,x2 are the axis of x,y1,y2 are the axis of y, which two-point makes a line head is a circle with cx, cy(the center of the circle),r(the radius of the circle) body ,arms and legs are all the lines where displaying the wrong letters success message box same typing message box C SS the hangman fill and stroke set up hide the hangman lines first hide the popup container first and change it in the js positi o n the notification box outside of the page and change the y axis to show up J S all the DOMs needed the data is the array with several words or can be fetched from API each time the selected word should be a random one the co...