unexpected token: boolean
in
Programming Questions
•
2 years ago
- class Bullet{
- float x,y;
- Bullet(int startX, int startY){
- x = startX;
- y = startY;
- }
- void move(){
- y -= 3;
- }
- void put(){
- rect(x, y, 5, 5);
- }
- }
- class Player{
- int x, y;
- int dirx, diry;
- Player(int startX, int startY){
- x = startX;
- y = startY;
- }
- void put(){
- rect(x, y, 10, 10);
- }
- void move(){
- y = y +diry;
- x = x+dirx;
- }
- }
- class Enemy{
- int x, y;
- int dirx, diry;
- Enemy(int startX, int startY){
- x=startX;
- y=startY;
- }
- void put(){
- rect(x, y, 10, 10);
- }
- void move(){
- y = y +diry;
- x = x+dirx;
- }
- }
1