Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main;
- /**
- * This class represent the player in a MP aoe2 game.
- *
- */
- class Player{
- boolean hasRole = false; // in aoe2 can be replicated by a variable called "player <N> has role?" put 0 if false, 1 if true. Or by having a variable named after the role, with a value that equal to the player(Recommended).
- int role = 0; // the # of the role, the amount of roles equals to the amount of players. in aoe2 use a variable named for each role, and put the number of player after.(example: "cultist" variable with "2" as input represents p2 is cultist
- int chance[]; //the chance of the player to get a role. each index is a different role, the value of that index is the "chance" percentage given in the trigger.
- /**
- * setting up a player, and changing the array to fit the amount of chosen roles by the user
- * @param _roles the amount of roles
- */
- public Player(int _roles)
- {
- int chances[] = new int[_roles];
- chance = chances;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement