){
                    ship.x=(ship.x+cw)%cw;
                }
                if(ship.y>ch||ship.y<0){
                    ship.y=(ship.y+ch)%ch;
                }
                ship.draw(context);
            }());


        })();
    </script>
</body>

</html>
