Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f6e73a6
got basic functionality on first iteration of elevator
shaysheller Mar 21, 2023
b66179c
Finished user input functionality on slower algorithm
shaysheller Mar 22, 2023
0bd7f91
Finished quit functionality for slower algorithm
shaysheller Mar 22, 2023
efb04e0
Starting to work on functionality where if elevator is not moving pas…
shaysheller Mar 27, 2023
3d9b5d5
Finished base functionality with better movement algorithm
shaysheller Mar 27, 2023
4456d3a
Finished functionality without weight. Cleaned up to be more readable…
shaysheller Mar 27, 2023
2dcd905
Added quit functionality back to program
shaysheller Mar 27, 2023
226d9de
Functionality finished with weight
shaysheller Mar 27, 2023
f09ad93
Re committing finished weight functionality
shaysheller Mar 27, 2023
681067c
Migrated to TypeScript
shaysheller Mar 28, 2023
7aa9432
Fixed quit functionality
shaysheller Mar 28, 2023
cff60f1
Finished testing and readme
shaysheller Mar 28, 2023
4a1c68a
Delete main.js
shaysheller Mar 28, 2023
436dc71
Delete output.txt
shaysheller Mar 28, 2023
a12e348
Updated Readme
shaysheller Mar 28, 2023
7b584ae
changed quit entry from quit to q
shaysheller Mar 28, 2023
93c25eb
Refactoring move function to make logic more clear
shaysheller Mar 30, 2023
438a276
Working on testing for elevator. Moving test folder from root to buil…
shaysheller Apr 3, 2023
b508879
Finished unit tests for both elevator and request class.
shaysheller Apr 3, 2023
d456e5f
Delete coverage directory
shaysheller Apr 3, 2023
2e2c19a
Delete output.txt
shaysheller Apr 3, 2023
4343c98
Update README2.md
shaysheller Apr 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions build/coverage/lcov-report/block-navigation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
"use strict";
/* eslint-disable */
var jumpToCode = (function init() {
// Classes of code we would like to highlight in the file view
var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
// Elements to highlight in the file listing view
var fileListingElements = ['td.pct.low'];
// We don't want to select elements that are direct descendants of another match
var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
// Selecter that finds elements on the page to which we can jump
var selector = fileListingElements.join(', ') +
', ' +
notSelector +
missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
// The NodeList of matching elements
var missingCoverageElements = document.querySelectorAll(selector);
var currentIndex;
function toggleClass(index) {
missingCoverageElements
.item(currentIndex)
.classList.remove('highlighted');
missingCoverageElements.item(index).classList.add('highlighted');
}
function makeCurrent(index) {
toggleClass(index);
currentIndex = index;
missingCoverageElements.item(index).scrollIntoView({
behavior: 'smooth',
block: 'center',
inline: 'center'
});
}
function goToPrevious() {
var nextIndex = 0;
if (typeof currentIndex !== 'number' || currentIndex === 0) {
nextIndex = missingCoverageElements.length - 1;
}
else if (missingCoverageElements.length > 1) {
nextIndex = currentIndex - 1;
}
makeCurrent(nextIndex);
}
function goToNext() {
var nextIndex = 0;
if (typeof currentIndex === 'number' &&
currentIndex < missingCoverageElements.length - 1) {
nextIndex = currentIndex + 1;
}
makeCurrent(nextIndex);
}
return function jump(event) {
if (document.getElementById('fileSearch') === document.activeElement &&
document.activeElement != null) {
// if we're currently focused on the search input, we don't want to navigate
return;
}
switch (event.which) {
case 78: // n
case 74: // j
goToNext();
break;
case 66: // b
case 75: // k
case 80: // p
goToPrevious();
break;
}
};
})();
window.addEventListener('keydown', jumpToCode);
Loading