Completed match constructor.
This commit is contained in:
parent
4719b3e9f2
commit
cc811c93a2
@ -1,6 +1,7 @@
|
||||
package Match;
|
||||
|
||||
import input.InputBuffer;
|
||||
import Entities.*;
|
||||
|
||||
/**
|
||||
* Main class that describes the base structure of the match, with characters, timer and such
|
||||
@ -18,16 +19,20 @@ public class match {
|
||||
private InputBuffer inputsP1, inputsP2;
|
||||
private int hpP1, hpP2;
|
||||
private int roundsWonP1, roundsWonP2;
|
||||
private Entities.Character p1, p2; //characters of player 1 and 2
|
||||
|
||||
/**
|
||||
* base constructor of the match class
|
||||
* base constructor of the match class.
|
||||
* Initiates a new match with with two given characters
|
||||
*/
|
||||
public match() {
|
||||
public match(Entities.Character p1, Entities.Character p2) {
|
||||
this.timer = 99;
|
||||
this.inputsP1 = new input.InputBuffer(inputBufferSize);
|
||||
this.inputsP2 = new input.InputBuffer(inputBufferSize);
|
||||
this.hpP1 = 1000; //TODO : change to char max hp
|
||||
this.hpP2 = 1000;
|
||||
this.p1 = p1;
|
||||
this.p2 = p2;
|
||||
this.hpP1 = p1.getMaxHP();
|
||||
this.hpP2 = p2.getMaxHP();
|
||||
this.roundsWonP1 = 0;
|
||||
this.roundsWonP2 = 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user