Posts

Showing posts with the label JavaScript

JavaScript and a Matrix

Image
Screenshot of the code a 10 by 10 matrix Update 5/11/2021 I have successfully used the matrix to create a Snake game in Angular. See the live (Desktop only) game here: Firebase Deploy of Angular S N A K E Update 3/23/2021: I have changed the live version of the game to dynamically create the map for the minesweeper and this allowed for many open windows as to how I can upgrade and add onto the game. The easy version of the game allows people to learn and see how to form a strategy to defeat the original version of the game. There are sounds and options for game type and game size. Click on the options to turn the sound off if loud noises startle you as losing the games results in an explosion noise. Below is the link to the game, hosted on GitHub, and a GitHub link if you'd like to fork the code. Live Game: http...

Creating a JavaScript HTML and CSS Image Carousel

JavaScript Experiment: Carousel images  Part 1 SET UP: The first thing I am going to do is set up my HTML file, and the CSS that will control the design.  In the head of the html I will include the meta information that will help describe the purpose, and content of the page. The viewport is important not only for mobile design, but accessibility.  We want users to be able to scale the page to at least 5 times it's initial size.  This way if they need to enlarge font and content to see it, they can.  In the body, we'll define the objects/tags we want to be able to manipulate in both the CSS and in the javascript. The easiest and fastest way to change items in the HTML with JavaScript is with the unique id applied to the item.  The DOM can find these, and apply the code to them without much hassle.  For items I will be manipulating in the JavaScript, I add an id, with a snake case.  JavaScript can get fussy about hash marks.  For classes, or C...