This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Game from './Game.js'; | |
/** | |
* Represents a basic Game Loop based on `requestAnimationFrame()`. | |
* | |
* The implementation of this class depends on another class: `Game`. This | |
* means that, if you use this class, you need to either have a `Game` class | |
* that exactly implements the three methods `processInput()`, `update(elapsed)` | |
* and `render()` or change the code in the `step()` method of this class so it | |
* represents your own game methods. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Listens to mouse events within the window and document and holds the current | |
* mouse state like position, buttons and whether or not the mouse is within the | |
* browser window. | |
* | |
* @author BugSlayer | |
*/ | |
export default class MouseListener { | |
/* | |
* THESE ARE CONSTANTS THAT DEFINE THE DIFFERENT BUTTON STATES |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="description" content=""> | |
<meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors"> | |
<meta name="generator" content="Hugo 0.88.1"> | |
<title>Pricing example · Bootstrap v5.1</title> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Divide balls a - i into THREE groups. | |
// Use two of them to weigh on the scales, ignore the third | |
if (abc < ghi) { | |
// a, b or c must be lighter | |
// Take any two of these to compare, ignore the third | |
if ( a < c ) { | |
console.log("a is lighter"); | |
} else if ( a == c ) { | |
console.log("b is lighter"); | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "HZ-HBOICT Laravel Style Check" | |
on: | |
pull_request: | |
paths: | |
- "**.php" | |
- "phpcs.xml" | |
- ".github/workflows/HZ-HBOICT-PHPcs.yml" | |
jobs: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!-- | |
VERSION: 2.0 | |
PHP_CodeSniffer ruleset tailored for HZ-HBOICT Laravel projects. This file defines | |
which files to check and what to check in each file. This will provide feedback to | |
students about their code quality. | |
This configuration is used in a GitHub action. | |
================================== | |
DO NOT CHANGE OR DELETE THIS FILE! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@if (session('status')) {{-- status messages are for auth and password messages --}} | |
<div class="notification is-success"> | |
<button class="delete"></button> | |
{{ session('status') }} | |
</div> | |
@endif | |
@if(session('info')) | |
<div class="notification is-info"> | |
<button class="delete"></button> | |
{{ session('info') }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"type": "shell", | |
"command": "docker run --rm -it -v ${PWD}:/app -w=\"/app\" node:latest npm install", | |
"group": "build", | |
"problemMatcher": [], | |
"label": "npm: install (Docker)", | |
"detail": "install dependencies from package", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This class implements a game loop using the "Play catch up" method. It will | |
* update the game using a fixed time step because that makes everything simpler | |
* and more stable for physics and AI. But it will allow flexibility in when we | |
* render in order to free up some processor time. | |
* | |
* It goes like this: A certain amount of real time has elapsed since the last | |
* turn of the game loop. This is how much game time we need to simulate for the | |
* game’s “now” to catch up with the player’s. We do that using a series of | |
* fixed time steps. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This class handles the keyboard events. It knows the last known state of its | |
* keys | |
* | |
* Some parts of this class are pretty complex, but the class itself is fairly | |
* easy to use. You just instantiate one object in your game and us the method | |
* `isKeyDown()` to check if a specific key is currently pressed down by the | |
* user. | |
* | |
* NOTE: It is known that the MouseEvent.keyCode property is deprecated, which |