{"action":"created","issue":{"url":"https://api.github.com/repos/mositech/CS2015/issues/12","labels_url":"https://api.github.com/repos/mositech/CS2015/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/mositech/CS2015/issues/12/comments","events_url":"https://api.github.com/repos/mositech/CS2015/issues/12/events","html_url":"https://github.com/mositech/CS2015/issues/12","id":110863946,"number":12,"title":"HW #5","user":{"login":"chasestarr","id":5317799,"avatar_url":"https://avatars.githubusercontent.com/u/5317799?v=3","gravatar_id":"","url":"https://api.github.com/users/chasestarr","html_url":"https://github.com/chasestarr","followers_url":"https://api.github.com/users/chasestarr/followers","following_url":"https://api.github.com/users/chasestarr/following{/other_user}","gists_url":"https://api.github.com/users/chasestarr/gists{/gist_id}","starred_url":"https://api.github.com/users/chasestarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chasestarr/subscriptions","organizations_url":"https://api.github.com/users/chasestarr/orgs","repos_url":"https://api.github.com/users/chasestarr/repos","events_url":"https://api.github.com/users/chasestarr/events{/privacy}","received_events_url":"https://api.github.com/users/chasestarr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mositech/CS2015/labels/homework","name":"homework","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-11T15:42:42Z","updated_at":"2015-10-13T16:07:50Z","closed_at":null,"body":"*In this homework we will be practicing how to use an if statement to tell our moving ball to change movement direction when it hits a wall.*\r\n\r\nDraw a moving ellipse. Remember back to last week's [homework](https://github.com/mositech/CS2015/issues/10) if you need help with this part. \r\nNext, make an if statement that checks for the object's position. When this position is the same as the screen width, reverse the direction. Do this for both the right wall and the left wall.\r\n\r\nTake a look at [this](https://github.com/mositech/CS2015/blob/master/Class-Material/week05/examples/bounceOffWall/bounceOffWall.pde) code example for help. Also look at the image notes from this week [here](https://github.com/mositech/CS2015/tree/master/Class-Material/week05)\r\n\r\n**Please paste your code as a comment on this post**"},"comment":{"url":"https://api.github.com/repos/mositech/CS2015/issues/comments/147761599","html_url":"https://github.com/mositech/CS2015/issues/12#issuecomment-147761599","issue_url":"https://api.github.com/repos/mositech/CS2015/issues/12","id":147761599,"user":{"login":"Firefox99","id":14336439,"avatar_url":"https://avatars.githubusercontent.com/u/14336439?v=3","gravatar_id":"","url":"https://api.github.com/users/Firefox99","html_url":"https://github.com/Firefox99","followers_url":"https://api.github.com/users/Firefox99/followers","following_url":"https://api.github.com/users/Firefox99/following{/other_user}","gists_url":"https://api.github.com/users/Firefox99/gists{/gist_id}","starred_url":"https://api.github.com/users/Firefox99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Firefox99/subscriptions","organizations_url":"https://api.github.com/users/Firefox99/orgs","repos_url":"https://api.github.com/users/Firefox99/repos","events_url":"https://api.github.com/users/Firefox99/events{/privacy}","received_events_url":"https://api.github.com/users/Firefox99/received_events","type":"User","site_admin":false},"created_at":"2015-10-13T16:07:50Z","updated_at":"2015-10-13T16:07:50Z","body":"int xEllipse=0;\r\nint yEllipse=400;\r\nint speed=2;\r\n\r\nint xEllipse2=400;\r\nint yEllipse2=0;\r\n\r\nvoid setup(){\r\n  size(800,800);\r\n}\r\n\r\nvoid draw(){\r\n  background(0,0,0);\r\nfill(0,random(0,255),random(0,255));\r\n  ellipse(xEllipse,yEllipse,75,75);\r\n  xEllipse=xEllipse+speed;\r\n  if(xEllipse>800){\r\n    speed=speed*-1;\r\n  }  \r\n\r\n  if(xEllipse<0){\r\n    speed=speed*-1;\r\n  }\r\n  fill(random(0,255),random(0,255),0);\r\n  ellipse(xEllipse2,yEllipse2,75,75);\r\n  yEllipse2=yEllipse2+speed;\r\n  if(yEllipse2>800){\r\n   speed=speed*-1;\r\n  }\r\n  if(yEllipse2<0){\r\n   speed=speed*-1; \r\n  }\r\n   \r\n}"}}