Commit caf95307 authored by Šimon Zvára's avatar Šimon Zvára
Browse files

bug fix

parent c6cf7bc5
......@@ -112,28 +112,28 @@ export default class Field {
let element = instance.field[x][y];
let assigned = null;
switch (element.class) {
case NumberElement.name:
case "NumberElement":
assigned = new NumberElement;
break;
case RedVirusElement.name:
case "RedVirusElement":
assigned = new RedVirusElement;
break;
case SafeElement.name:
case "SafeElement":
assigned = new SafeElement;
break;
case UnknownSafeElement.name:
case "UnknownSafeElement":
assigned = new UnknownSafeElement;
break;
case UnknownVirusElement.name:
case "UnknownVirusElement":
assigned = new UnknownVirusElement;
break;
case VirusElement.name:
case "VirusElement":
assigned = new VirusElement;
break;
case FlagVirusElement.name:
case "FlagVirusElement":
assigned = new FlagVirusElement();
break;
case FlagSafeElement.name:
case "FlagSafeElement":
assigned = new FlagSafeElement();
break;
}
......
......@@ -10,7 +10,7 @@ export default class FlagSafeElement extends UnknownSafeElement {
constructor() {
super();
this.class = FlagSafeElement.name;
this.class = "FlagSafeElement";
}
getImageFile() {
......
......@@ -10,7 +10,7 @@ export default class FlagVirusElement extends UnknownVirusElement {
constructor() {
super();
this.class = FlagVirusElement.name;
this.class = "FlagVirusElement";
}
getImageFile() {
......
......@@ -15,7 +15,7 @@ export default class NumberElement extends Element {
constructor(number) {
super();
this.number = number;
this.class = NumberElement.name;
this.class = "NumberElement";
}
getImageFile() {
......
......@@ -10,7 +10,7 @@ export default class RedVirusElement extends VirusElement {
constructor() {
super();
this.class = RedVirusElement.name;
this.class = "RedVirusElement";
}
getImageFile() {
......
......@@ -10,7 +10,7 @@ export default class SafeElement extends Element {
constructor() {
super();
this.class = SafeElement.name;
this.class = "SafeElement";
}
getImageFile() {
......
......@@ -11,7 +11,7 @@ export default class UnknownSafeElement extends Element {
constructor() {
super();
this.class = UnknownSafeElement.name;
this.class = "UnknownSafeElement";
}
getImageFile() {
......
......@@ -11,7 +11,7 @@ export default class UnknownVirusElement extends Element {
constructor() {
super();
this.class = UnknownVirusElement.name;
this.class = "UnknownVirusElement";
}
getImageFile() {
......
import Element from "@/js/Element";
export default function VirusElement(){
this.class = VirusElement.name;
this.class = "VirusElement";
}
VirusElement.prototype = Element.prototype;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment