Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ntn16104 committed Dec 5, 2020
2 parents 69b5666 + e857f2e commit 84b477b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions js/canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ canvas.height = window.innerHeight;
var ctx = canvas.getContext('2d');

var dddState; //global variable for DDD state
var sliderVal; //global speed for packet(s)

function drawEntities(allEntities) {
// Given a list of entities in the system, draw them to the screen
Expand Down Expand Up @@ -45,6 +44,7 @@ function runSim(packetArray, allEntities) {
}

function animatePacket(packets, allEntities) {
let sliderVal = document.getElementById('myRange').value; // global speed
let map = new Map();
map[1] = 20;
map[2] = 30;
Expand Down Expand Up @@ -129,7 +129,6 @@ async function startSimulation() {
dddState = document.getElementById('DDDstate').checked; //global variable for DDD state
let nPorts = document.getElementById('nports').value;

sliderVal = document.getElementById('myRange').value; // global speed

// Initialize the entity objects
let garbage = new Garbage(700, 400);
Expand Down

0 comments on commit 84b477b

Please sign in to comment.