Question: When I call move() the "y" variable is changed but the box is still rendered in the same position.

```
var c = document.getElementById("can");  //my canvas id is "can"  
var pen = c.getContext("2d");
var y = 200;
setInterval(render(y), 1000/30); //update 30 times per second

function move(dir){
    y=y+dir;
}

function render(height) {
    pen.beginPath();
    pen.clearRect(0,0,888,500);
    pen.beginPath();
    pen.rect(30,height,50,50); //Draw the player
    pen.fillStyle="green";
    pen.fill();
}

```

Answer: 
First problem: Instead of single pipe, use double pipe `||` for `OR`. 

Second problem: Use `Equilateral` condition before `Isosceles`
 So if your sides are `2`,`2` and `2` then as per your logic, `Isosceles` condition satisfies first. So it will never equate it to `Equilateral`

New Answer: In fact, you don't need 2 case statements. Use this instead

<http://rextester.com/PTDI48631>

```
select t.*,
case when not (a+b > c and b+c > a and c+a > b)  
        then "Not A Triangle"
     when (a=b and a=c and b=c) 
         then "Equilateral"
     when (a=b or a=c or b=c) 
         then "Isosceles"
     else "Scalene"
end as Triangle_type
from triangle t;

```

Previous Answer:
<http://rextester.com/ELLB75736>

```
select t.*,
case  when a+b > c and b+c > a and c+a > b 
then
(case 
    when a=b and a=c and b=c then "Equilateral"
    when a=b or a=c or b=c then "Isosceles"
    when a<>b and b<>c and a<>c then "Scalene"
    end
)
else 
"Not A Triangle"
end as Triangle_type
from triangle234 t

```
```
select case when a+b > c and b+c > a and c+a > b then 
case 
    when (a=b & a=c)|(a=b & b=c) | (a=c & b=c) then "Isosceles"
    when a=b and a=c and b=c then "Equilateral"
    when a<>b and b<>c and a<>c then "Scalene"
    Else "Triangle"
end
else "Not A Triangle"
end 
from triangles

```

Just try above code.I think you missed `else` for internal `WHEN`.
Hope this will helps.