Skip to content

Instantly share code, notes, and snippets.

View straker's full-sized avatar

Steven Lambert straker

View GitHub Profile
@straker
straker / README.md
Last active October 20, 2023 13:13
Basic Bust-a-Move / Puzzle Bobble / Bubble Shooter HTML and JavaScript Game

Basic Bust-a-Move / Puzzle Bobble / Bubble Shooter HTML and JavaScript Game

This is a basic implementation of the game Bust-a-Move / Puzzle Bobble / Bubble Shooter, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

  • More levels
  • Add more levels and have the next level start once the last one is finished
@straker
straker / README.md
Last active September 21, 2023 15:45
Basic Missile Command HTML and JavaScript Game

Basic Missile Command HTML and JavaScript Game

This is a basic implementation of the Atari Missile Command game, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

  • Score
  • When a missile explodes (not a counter-missile), the score should increase by 25
@straker
straker / README.md
Last active September 3, 2023 21:28
Basic Frogger HTML and JavaScript Game

Basic Frogger HTML and JavaScript Game

This is a basic implementation of the Konami Frogger game, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

  • Lives
  • Frogger starts with 6 lives and should lose a life whenever it is hit by a vehicle or lands in the water
@straker
straker / .babelrc
Last active October 20, 2022 12:00
Example of running axe-core using Jest and Enzyme
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
],
@straker
straker / .babelrc
Created March 7, 2022 17:34
Example of running axe-core using Jest and @testing-library/react
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
],
@straker
straker / wrapper.js
Last active October 20, 2022 11:31
Simple wrapper around DOM functions to make DOM interactions a bit easier to work with
(function(Node, Element, HTMLCollection, Array) {
/**
* Wrap addEventListener to handle multiple event types and be chainable.
* @param {string} types - Space-separated event types.
* @param {function} listener
* @param {boolean} useCapture
* @returns {Node}
*
* @example
* document.querySelector('a')
@straker
straker / nativeDomAPI.js
Last active October 20, 2022 11:22
HTML DOM api standards proposal - examples of how the native HTML DOM api is cumbersome to use and how different libraries handle it
/**
* Create element with attributes
*
* <input type="number" min="0" max="99" name="number" id="number" class="number-input" disabled/>
*/
// native
var input = document.createElement('input');
input.type = "number";
input.min = 0;