Update flipflop.js

This commit is contained in:
felixs-alt 2023-09-26 12:32:36 +02:00 committed by GitHub
parent d5066e46b3
commit 04e1bcd2db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -13,8 +13,8 @@ elements.flipflop = {
let Powerstate = pixel.powerst
let Output = pixelMap[pixel.x+1][pixel.y]
let Input = pixelMap[pixel.x-1][pixel.y]
console.log(Output)
if (typeof Output !== "null" && typeof Input !== "null"){
console.log(typeof Output)
if (typeof Output !== "undefined" && typeof Input !== "undefined"){
Output.charge = 0
if (Powerstate == "true" && Input.charge > 0.9) {
Powerstate == "false"