Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Player {
- ...
- }
- $myPlayer = New Player(4, 3);
- $myPlayer2 = New Player(10, 20);
- myPlayer2->moveLeft();
- myPlayer2->moveLeft();
- myPlayer2->moveLeft();
- myPlayer2->moveUp();
- myPlayer2->printCoordinate();
- ?>
- Le code au dessus affichera dans l'ordre :
- A player has been created to coordinate 4 and 3.
- A player has been created to coordinate 10 and 20.
- Current player coordinate is 7 and 21.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement